pub struct Bounds {
pub width: u32,
pub height: u32,
}Expand description
A 2D toroidal bounds definition
Fields§
§width: u32§height: u32Implementations§
Source§impl Bounds
impl Bounds
pub fn new(width: u32, height: u32) -> Bounds
Sourcepub fn get_toroidal_distance(&self, distance: Vec2) -> Vec2
pub fn get_toroidal_distance(&self, distance: Vec2) -> Vec2
Similar to toroidal::min_distance() but for a 2D toroidal space.
Sourcepub fn get_toroidal_position(&self, position: Vec2) -> Vec2
pub fn get_toroidal_position(&self, position: Vec2) -> Vec2
Similar to toroidal::min_coordinate()` but for a 2D toroidal space.
Sourcepub fn get_toroidal_aabb(
&self,
aabb: &AxisAlignmentBoundingBox,
) -> AxisAlignmentBoundingBox
pub fn get_toroidal_aabb( &self, aabb: &AxisAlignmentBoundingBox, ) -> AxisAlignmentBoundingBox
Similar to toroidal::min_coordinate()` but for an AABB.
Auto Trait Implementations§
impl Freeze for Bounds
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnwindSafe for Bounds
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