parry icon indicating copy to clipboard operation
parry copied to clipboard

Fix assertion message

Open YichiZhang0613 opened this issue 1 month ago • 0 comments

The assertion's predicate is amount >= 0.0 while message requires amount > 0.0, the message should be changed into "The loosening margin must be non-negative." based on semantic. The same issue elsewhere should also be fixed.

/// # Arguments
    ///
    /// * `amount` - The amount to increase the radius (must be non-negative)
    ///
    /// # Panics
    ///
    /// Panics if `amount` is negative.
#[inline]
    fn loosened(&self, amount: Real) -> BoundingSphere {
        assert!(amount >= 0.0, "The loosening margin must be positive.");
        BoundingSphere::new(self.center, self.radius + amount)
    }

YichiZhang0613 avatar Nov 07 '25 01:11 YichiZhang0613