diff options
Diffstat (limited to 'azalea-world/src')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 4 | ||||
| -rw-r--r-- | azalea-world/src/lib.rs | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index aad0f979..03bdcbb5 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -436,8 +436,8 @@ impl Default for ChunkStorage { #[inline] pub fn section_index(y: i32, min_y: i32) -> u32 { assert!(y >= min_y, "y ({y}) must be at least {min_y}"); - let min_section_index = min_y.div_floor(16); - (y.div_floor(16) - min_section_index) as u32 + let min_section_index = min_y >> 4; + ((y >> 4) - min_section_index) as u32 } #[cfg(test)] diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 55e47676..6677b326 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -1,5 +1,4 @@ #![doc = include_str!("../README.md")] -#![feature(int_roundings)] #![feature(error_generic_member_access)] mod bit_storage; |
