[−][src]Trait coord::math::VecFloat
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
Implementors
impl<T> VecFloat for Vec1<T> where
T: VecItem + Float,
[src]
T: VecItem + Float,
fn length(&self) -> Self::Item
[src]
fn norm(&self) -> Self
[src]
fn floor(&self) -> Self
[src]
fn ceil(&self) -> Self
[src]
fn round(&self) -> Self
[src]
impl<T> VecFloat for Vec2<T> where
T: VecItem + Float,
[src]
T: VecItem + Float,
fn length(&self) -> Self::Item
[src]
fn norm(&self) -> Self
[src]
fn floor(&self) -> Self
[src]
fn ceil(&self) -> Self
[src]
fn round(&self) -> Self
[src]
impl<T> VecFloat for Vec3<T> where
T: VecItem + Float,
[src]
T: VecItem + Float,
fn length(&self) -> Self::Item
[src]
fn norm(&self) -> Self
[src]
fn floor(&self) -> Self
[src]
fn ceil(&self) -> Self
[src]
fn round(&self) -> Self
[src]
impl<T> VecFloat for Vec4<T> where
T: VecItem + Float,
[src]
T: VecItem + Float,