Trait avian3d::math::RecipOrZero
source · pub trait RecipOrZero {
// Required method
fn recip_or_zero(self) -> Self;
}
Expand description
An extension trait for computing reciprocals without division by zero.
Required Methods§
sourcefn recip_or_zero(self) -> Self
fn recip_or_zero(self) -> Self
Computes the reciprocal of self
if self
is not zero,
and returns zero otherwise to avoid division by zero.
Object Safety§
This trait is not object safe.