Trait Inverse

Source
pub trait Inverse {
    type Output;

    // Required method
    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§

Source

fn inv(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl Inverse for &f32

Source§

type Output = f32

Source§

fn inv(self) -> f32

Source§

impl Inverse for &f64

Source§

type Output = f64

Source§

fn inv(self) -> f64

Source§

impl Inverse for f32

Source§

type Output = f32

Source§

fn inv(self) -> f32

Source§

impl Inverse for f64

Source§

type Output = f64

Source§

fn inv(self) -> f64

Implementors§