[][src]Trait vector2math::FloatingScalar

pub trait FloatingScalar: Scalar + Pow<Self, Output = Self> + Trig {
    const PI: Self;
    const EPSILON: Self;
    fn tau() -> Self { ... }
fn lerp(self, other: Self, t: Self) -> Self { ... }
fn angle_as_vector(self) -> [Self; 2] { ... }
fn is_zero(self) -> bool { ... } }

Trait for floating-point scalar numbers

Associated Constants

const PI: Self

The value of Pi

const EPSILON: Self

The epsilon value

Loading content...

Provided methods

fn tau() -> Self

Get the value of Tau, or 2π

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

Linear interpolate the scalar with another

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

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

fn is_zero(self) -> bool

Check if the value is within its epsilon range

Loading content...

Implementations on Foreign Types

impl FloatingScalar for f32[src]

impl FloatingScalar for f64[src]

Loading content...

Implementors

Loading content...