pub trait FloatingScalar: Scalar + Mul<Output = Self> + Neg<Output = Self> {
    const TAU: Self;
    const PI: Self;
    const EPSILON: Self;

    fn sqrt(self) -> Self;
    fn cos(self) -> Self;
    fn sin(self) -> Self;
    fn atan2(self, other: Self) -> Self;

    fn square(self) -> Self { ... }
    fn tan(self) -> Self { ... }
    fn lerp(self, other: Self, t: Self) -> Self { ... }
    fn angle_as_vector(self) -> [Self; 2] { ... }
    fn is_zero(self) -> bool { ... }
    fn is_near_zero(self, n: Self) -> bool { ... }
}
Expand description

Trait for floating-point scalar numbers

Required Associated Constants§

The value of Tau, or 2π

The value of π

The epsilon value

Required Methods§

Get the sqare root of the scalar

Get the cosine

Get the sine

Get the four-quadrant arctangent

Provided Methods§

Square the scalar

Get the tangent

Linear interpolate the scalar with another

Get the unit vector corresponding to an angle in radians defined by the scalar

Check if the value is within its epsilon range

Check if the value is within a multiple epsilon range

Implementations on Foreign Types§

Implementors§