Trait vector2math::Scalar

source ·
pub trait Scalar: Add<Self, Output = Self> + Copy + PartialEq + PartialOrd + Sub<Self, Output = Self> + Mul<Self, Output = Self> + Div<Self, Output = Self> {
    const ZERO: Self;
    const ONE: Self;
    const TWO: Self;

    fn abs(self) -> Self;

    fn maxx(self, other: Self) -> Self { ... }
    fn minn(self, other: Self) -> Self { ... }
}
Expand description

Trait for math with scalar numbers

Required Associated Constants§

The value of 0

The value of 1

The value of 2

Required Methods§

Get the absolute value of the number

Provided Methods§

Get the max of this Scalar and another

This function is named to not conflict with the Scalar’s default max function

Get the min of this Scalar and another

This function is named to not conflict with the Scalar’s default min function

Implementations on Foreign Types§

Implementors§