Skip to content

Commit

Permalink
Not sure what I was thinking
Browse files Browse the repository at this point in the history
  • Loading branch information
Waridley committed Feb 8, 2024
1 parent e2313b0 commit 4b6dd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rs/src/planet/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ impl From<ChunkIndex> for ChunkCenter {
impl From<PlanetVec2> for ChunkIndex {
fn from(value: PlanetVec2) -> Self {
Self::new(
((value.x / (CHUNK_COLS as f64 * TERRAIN_CELL_SIZE as f64)) + 0.5) as i32,
((value.y / (CHUNK_ROWS as f64 * TERRAIN_CELL_SIZE as f64)) + 0.5) as i32,
(value.x / (CHUNK_COLS as f64 * TERRAIN_CELL_SIZE as f64)).round() as i32,
(value.y / (CHUNK_ROWS as f64 * TERRAIN_CELL_SIZE as f64)).round() as i32,
)
}
}
Expand Down

0 comments on commit 4b6dd01

Please sign in to comment.