Trait dashu_base::math::Inverse

source ·
pub trait Inverse {
    type Output;

    fn inv(self) -> Self::Output;
}
Expand description

Compute the multiplicative inverse (aka. reciprocal) of the number.

Examples

assert_eq!(0.1234.inv(), 8.103727714748784);
assert_eq!(f32::INFINITY.inv(), 0f32);

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Implementors§