diff options
| author | mat <git@matdoes.dev> | 2023-10-07 15:27:21 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-07 15:27:21 -0500 |
| commit | 5d075abfc5d09bd881095b09c16b38c1a27fbb23 (patch) | |
| tree | cbd8e40bb55b45523e0ce1596cf1d02f1fbe2b41 /azalea-world/src/chunk_storage.rs | |
| parent | 3831bd6f9cded2831a173c317832dd5f03617b38 (diff) | |
| download | azalea-drasl-5d075abfc5d09bd881095b09c16b38c1a27fbb23.tar.xz | |
make pathfinder twice as fast :sunglasses:
Diffstat (limited to 'azalea-world/src/chunk_storage.rs')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index db4dd952..aad0f979 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -433,6 +433,7 @@ impl Default for ChunkStorage { /// Get the index of where a section is in a chunk based on its y coordinate /// and the minimum y coordinate of the world. +#[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); |
