Fixed a lot of bad math causing issues in negative chunks

This commit is contained in:
2025-03-02 13:33:43 -06:00
parent cc339b9389
commit bd2130dfa0
5 changed files with 110 additions and 82 deletions

View File

@@ -12,7 +12,7 @@ vec2i_to_vec2 :: proc(v2i:Vec2i) -> [2]f32 {
}
vec2_to_vec2i :: proc(v2:[2]f32) -> Vec2i {
return {int(v2.x), int(v2.y)}
return {int(math.floor(v2.x)), int(math.floor(v2.y))}
}
hash_noise :: proc(x, y: int, seed: i64) -> f32 {