[][src]Trait coord::math::VecFloat

pub trait VecFloat: Vector where
    Self::Item: VecItem + Float
{ fn length(&self) -> Self::Item;
fn norm(&self) -> Self;
fn floor(&self) -> Self;
fn ceil(&self) -> Self;
fn round(&self) -> Self; }

A trait for vectors containing floating point numerical types

Required methods

fn length(&self) -> Self::Item

Calculates the magnitude of the vector

fn norm(&self) -> Self

Calculates the normalized form of the vector (i.e: a vector with identical direction but a magnitude of 1)

fn floor(&self) -> Self

Rounds each element of the vector down to the nearest whole number

fn ceil(&self) -> Self

Rounds each element of the vector up to the nearest whole number

fn round(&self) -> Self

Rounds each element of the vector to the nearest whole number

Loading content...

Implementors

impl<T> VecFloat for Vec1<T> where
    T: VecItem + Float
[src]

impl<T> VecFloat for Vec2<T> where
    T: VecItem + Float
[src]

impl<T> VecFloat for Vec3<T> where
    T: VecItem + Float
[src]

impl<T> VecFloat for Vec4<T> where
    T: VecItem + Float
[src]

Loading content...