package game import "core:math" Vec2i :: struct { x: int, y: int, } vec2i_to_vec2 :: proc(v2i:Vec2i) -> [2]f32 { return {f32(v2i.x), f32(v2i.y)} } vec2_to_vec2i :: proc(v2:[2]f32) -> Vec2i { return {int(v2.x), int(v2.y)} } hash_noise :: proc(x, y: int, seed: u32) -> f32 { h: u32 = u32(x) * 374761393 h *= u32(y) * 668265263 h *= seed h *= 3266489917 h >>= 16 return f32(h & 0xFFFF) / 65535.0 }