diff --git a/src/bounding_volume/aabb.rs b/src/bounding_volume/aabb.rs index 2fcce281..1a1d0b13 100644 --- a/src/bounding_volume/aabb.rs +++ b/src/bounding_volume/aabb.rs @@ -973,14 +973,14 @@ impl BoundingVolume for Aabb { #[inline] fn loosen(&mut self, amount: Real) { - assert!(amount >= 0.0, "The loosening margin must be positive."); + assert!(amount >= 0.0, "The loosening margin must be non-negative."); self.mins += Vector::repeat(-amount); self.maxs += Vector::repeat(amount); } #[inline] fn loosened(&self, amount: Real) -> Aabb { - assert!(amount >= 0.0, "The loosening margin must be positive."); + assert!(amount >= 0.0, "The loosening margin must be non-negative."); Aabb { mins: self.mins + Vector::repeat(-amount), maxs: self.maxs + Vector::repeat(amount), @@ -989,7 +989,7 @@ impl BoundingVolume for Aabb { #[inline] fn tighten(&mut self, amount: Real) { - assert!(amount >= 0.0, "The tightening margin must be positive."); + assert!(amount >= 0.0, "The tightening margin must be non-negative."); self.mins += Vector::repeat(amount); self.maxs += Vector::repeat(-amount); assert!( @@ -1000,7 +1000,7 @@ impl BoundingVolume for Aabb { #[inline] fn tightened(&self, amount: Real) -> Aabb { - assert!(amount >= 0.0, "The tightening margin must be positive."); + assert!(amount >= 0.0, "The tightening margin must be non-negative."); Aabb::new( self.mins + Vector::repeat(amount), diff --git a/src/bounding_volume/bounding_sphere.rs b/src/bounding_volume/bounding_sphere.rs index 77420a8a..ad0ad942 100644 --- a/src/bounding_volume/bounding_sphere.rs +++ b/src/bounding_volume/bounding_sphere.rs @@ -475,7 +475,7 @@ impl BoundingVolume for BoundingSphere { /// ``` #[inline] fn loosen(&mut self, amount: Real) { - assert!(amount >= 0.0, "The loosening margin must be positive."); + assert!(amount >= 0.0, "The loosening margin must be non-negative."); self.radius += amount } @@ -509,7 +509,7 @@ impl BoundingVolume for BoundingSphere { /// ``` #[inline] fn loosened(&self, amount: Real) -> BoundingSphere { - assert!(amount >= 0.0, "The loosening margin must be positive."); + assert!(amount >= 0.0, "The loosening margin must be non-negative."); BoundingSphere::new(self.center, self.radius + amount) } @@ -542,7 +542,7 @@ impl BoundingVolume for BoundingSphere { /// ``` #[inline] fn tighten(&mut self, amount: Real) { - assert!(amount >= 0.0, "The tightening margin must be positive."); + assert!(amount >= 0.0, "The tightening margin must be non-negative."); assert!(amount <= self.radius, "The tightening margin is to large."); self.radius -= amount } @@ -577,7 +577,7 @@ impl BoundingVolume for BoundingSphere { /// ``` #[inline] fn tightened(&self, amount: Real) -> BoundingSphere { - assert!(amount >= 0.0, "The tightening margin must be positive."); + assert!(amount >= 0.0, "The tightening margin must be non-negative."); assert!(amount <= self.radius, "The tightening margin is to large."); BoundingSphere::new(self.center, self.radius - amount) }