Trait vector2math::FloatingScalar[][src]

pub trait FloatingScalar: Scalar + Neg<Output = Self> + Pow<Self, Output = Self> + Trig {
    const TAU: Self;
    const EPSILON: Self;
    fn pi() -> 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 { ... } }

Trait for floating-point scalar numbers

Associated Constants

const TAU: Self[src]

The value of Tau, or 2π

const EPSILON: Self[src]

The epsilon value

Loading content...

Provided methods

fn pi() -> Self[src]

Get the value of pi

fn lerp(self, other: Self, t: Self) -> Self[src]

Linear interpolate the scalar with another

fn angle_as_vector(self) -> [Self; 2][src]

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

fn is_zero(self) -> bool[src]

Check if the value is within its epsilon range

fn is_near_zero(self, n: Self) -> bool[src]

Check if the value is within a multiple epsilon range

Loading content...

Implementations on Foreign Types

impl FloatingScalar for f32[src]

impl FloatingScalar for f64[src]

Loading content...

Implementors

Loading content...