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

Method is_degenerate

splashsurf_lib/src/aabb.rs:159–161  ·  view source on GitHub ↗

Returns whether the AABB is degenerate in any dimension, i.e. `aabb.min()[i] == aabb.max()[i]` for any `i` ``` use crate::splashsurf_lib::Aabb3d; use nalgebra::Vector3; assert_eq!(Aabb3d:: ::zeros().is_degenerate(), true); assert_eq!(Aabb3d::new(Vector3::new(1.0, 1.0, 1.0), Vector3::new(1.0, 1.0, 1.0)).is_degenerate(), true); assert_eq!(Aabb3d::new(Vector3::new(-1.0, 0.0, -3.0), Vector3::new(2

(&self)

Source from the content-addressed store, hash-verified

157 /// assert_eq!(Aabb3d::new(Vector3::new(-1.0, 0.0, -3.0), Vector3::new(2.0, 2.0, 4.0)).is_degenerate(), false);
158 /// ```
159 pub fn is_degenerate(&self) -> bool {
160 self.min == self.max
161 }
162
163 /// Returns the extents of the bounding box (vector connecting min and max point of the box)
164 /// ```

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