struct Cube {
x1: i32,
x2: i32,
y1: i32,
y2: i32,
z1: i32,
z2: i32,
}
Fields§
§x1: i32
§x2: i32
§y1: i32
§y2: i32
§z1: i32
§z2: i32
Implementations§
source§impl Cube
impl Cube
fn new(x1: i32, x2: i32, y1: i32, y2: i32, z1: i32, z2: i32) -> Cube
sourcefn split(&self) -> [Cube; 8]
fn split(&self) -> [Cube; 8]
Split the cube into 8 non-overlapping sub-cubes. Since each cube size is always of power of two, we can safely divide by 2.
fn in_range(&self, nb: &Nanobot) -> bool
Auto Trait Implementations§
impl Freeze for Cube
impl RefUnwindSafe for Cube
impl Send for Cube
impl Sync for Cube
impl Unpin for Cube
impl UnwindSafe for Cube
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