Trait coord::math::VecFloat [−][src]
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