diff --git a/src/bounding_volume/aabb.rs b/src/bounding_volume/aabb.rs index 35c8f0d8..86b2e42c 100644 --- a/src/bounding_volume/aabb.rs +++ b/src/bounding_volume/aabb.rs @@ -994,14 +994,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::splat(-amount); self.maxs += Vector::splat(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::splat(-amount), maxs: self.maxs + Vector::splat(amount), @@ -1010,7 +1010,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::splat(amount); self.maxs += Vector::splat(-amount); assert!( @@ -1021,7 +1021,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::splat(amount), diff --git a/src/bounding_volume/bounding_sphere.rs b/src/bounding_volume/bounding_sphere.rs index ac9ed1fa..b9b76a61 100644 --- a/src/bounding_volume/bounding_sphere.rs +++ b/src/bounding_volume/bounding_sphere.rs @@ -469,7 +469,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 } @@ -503,7 +503,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) } @@ -536,7 +536,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 } @@ -571,7 +571,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) }