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: i64) -> f32 { h: i64 = i64(x) * 374761393 h *= i64(y) * 668265263 h *= seed h *= 3266489917 h >>= 16 return f32(h & 0xFFFF) / 65535.0 }