Trait image_moments::Scalar[][src]

pub trait Scalar: Debug + Copy + PartialEq + PartialOrd + AddAssign + MulAssign + Neg<Output = Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + Mul<Self, Output = Self> + Div<Self, Output = Self> {
    const EPSILON: Self;
    const ZERO: Self;
    const ONE: Self;
    const TWO: Self;
    const THREE: Self;
    const F1_2: Self;
    const F1_6: Self;
    const F1_12: Self;
    const F1_20: Self;
    const F1_24: Self;
    const F1_60: Self;

    fn abs(self) -> Self;
fn mul_add(self, a: Self, b: Self) -> Self;
fn powi(self, n: i32) -> Self;
fn copysign(self, sign: Self) -> Self;
fn sqrt(self) -> Self; }
Expand description

The type of floating-point number used to calculate the image moments.

Associated Constants

The smallest incremental step of this floating-point number.

The value of the scalar matching 0.0.

The value of the scalar matching 1.0.

The value of the scalar matching 2.0.

The value of the scalar matching 3.0.

The value of the scalar matching 1/2.

The value of the scalar matching 1/6.

The value of the scalar matching 1/12.

The value of the scalar matching 1/20.

The value of the scalar matching 1/24.

The value of the scalar matching 1/60.

Required methods

Computes the absolute value of self

Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add.

Raises a number to an integer power.

Returns a number composed of the magnitude of self and the sign of sign.

Calculate the square root.

Implementations on Foreign Types

Implementors