mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35: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 fnv::FnvHashMap;
|
||||||
use rand::{thread_rng, Rng};
|
use rand::{thread_rng, Rng};
|
||||||
|
|
||||||
type ChunkPosScalar = i16;
|
type ChunkPosScalar = u16;
|
||||||
|
|
||||||
#[derive(Hash, PartialEq, Eq, Debug, Clone, Copy)]
|
#[derive(Hash, PartialEq, Eq, Debug, Clone, Copy)]
|
||||||
pub struct ChunkPos {
|
pub struct ChunkPos {
|
||||||
|
|
@ -62,7 +62,7 @@ impl TilePos {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn chk_pos(tile: TilePosScalar) -> ChunkPosScalar {
|
fn chk_pos(tile: TilePosScalar) -> ChunkPosScalar {
|
||||||
(tile / CHUNK_EXTENT as TilePosScalar) as i16
|
(tile / CHUNK_EXTENT as TilePosScalar) as ChunkPosScalar
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue