mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
Make chunk pos scalar unsigned
This commit is contained in:
parent
2480c48cbf
commit
becc441955
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use fnv::FnvHashMap;
|
||||
use rand::{thread_rng, Rng};
|
||||
|
||||
type ChunkPosScalar = i16;
|
||||
type ChunkPosScalar = u16;
|
||||
|
||||
#[derive(Hash, PartialEq, Eq, Debug, Clone, Copy)]
|
||||
pub struct ChunkPos {
|
||||
|
|
@ -62,7 +62,7 @@ impl TilePos {
|
|||
}
|
||||
|
||||
fn chk_pos(tile: TilePosScalar) -> ChunkPosScalar {
|
||||
(tile / CHUNK_EXTENT as TilePosScalar) as i16
|
||||
(tile / CHUNK_EXTENT as TilePosScalar) as ChunkPosScalar
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue