pub struct ChunkHeight {
pub min: i8,
pub max: i8,
}
Expand description
A little structure that stores the height of a level (and so a chunk).
Fields§
§min: i8
Inclusive lower bound.
max: i8
Inclusive upper bound.
Implementations§
Source§impl ChunkHeight
impl ChunkHeight
pub fn new(min: i8, max: i8) -> Self
Sourcepub fn get_min_block(self) -> i32
pub fn get_min_block(self) -> i32
Returns the inclusive lower bound in blocks coordinates.
Sourcepub fn get_max_block(self) -> i32
pub fn get_max_block(self) -> i32
Returns the inclusive upper bound in blocks coordinates.
Trait Implementations§
Source§impl Clone for ChunkHeight
impl Clone for ChunkHeight
Source§fn clone(&self) -> ChunkHeight
fn clone(&self) -> ChunkHeight
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChunkHeight
impl Debug for ChunkHeight
impl Copy for ChunkHeight
Auto Trait Implementations§
impl Freeze for ChunkHeight
impl RefUnwindSafe for ChunkHeight
impl Send for ChunkHeight
impl Sync for ChunkHeight
impl Unpin for ChunkHeight
impl UnwindSafe for ChunkHeight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more