MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / is_consistent

Method is_consistent

splashsurf_lib/src/aabb.rs:147–149  ·  view source on GitHub ↗

Returns whether the AABB is consistent, i.e. `aabb.min()[i] <= aabb.max()[i]` for all `i` ``` use crate::splashsurf_lib::Aabb3d; use nalgebra::Vector3; assert_eq!( Aabb3d:: ::zeros().is_consistent(), true); assert_eq!(Aabb3d::new(Vector3::new(-1.0, -1.0, -1.0), Vector3::new(1.0, 1.0, 1.0)).is_consistent(), true); assert_eq!(Aabb3d::new(Vector3::new(-1.0, 1.0, -1.0), Vector3::new(1.0, -1.0, 1.0

(&self)

Source from the content-addressed store, hash-verified

145 /// assert_eq!(Aabb3d::new(Vector3::new(-1.0, 1.0, -1.0), Vector3::new(1.0, -1.0, 1.0)).is_consistent(), false);
146 /// ```
147 pub fn is_consistent(&self) -> bool {
148 self.min <= self.max
149 }
150
151 /// Returns whether the AABB is degenerate in any dimension, i.e. `aabb.min()[i] == aabb.max()[i]` for any `i`
152 /// ```

Callers 3

from_aabbMethod · 0.80
try_newMethod · 0.80
try_aabb_from_min_maxFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected