[−][src]Trait vector2math::FloatingVector2
Trait for manipulating floating-point 2D vectors
Provided methods
fn dist<V>(self, to: V) -> Self::Scalar where
V: Vector2<Scalar = Self::Scalar>,
V: Vector2<Scalar = Self::Scalar>,
Get the distance between this vector and another
fn mag(self) -> Self::Scalar
Get the vector's magnitude
fn unit(self) -> Self
Get the unit vector
fn rotate_about<V>(self, pivot: V, radians: Self::Scalar) -> Self where
V: Vector2<Scalar = Self::Scalar> + Clone,
V: Vector2<Scalar = Self::Scalar> + Clone,
Rotate the vector some number of radians about a pivot
fn lerp<V>(self, other: V, t: Self::Scalar) -> Self where
V: Vector2<Scalar = Self::Scalar>,
V: Vector2<Scalar = Self::Scalar>,
Linear interpolate the vector with another
fn atan(self) -> Self::Scalar
Get the arctangent of the vector, which corresponds to the angle it represents bounded between -π to π
Implementors
impl<T> FloatingVector2 for T where
T: Vector2,
T::Scalar: FloatingScalar,
[src]
T: Vector2,
T::Scalar: FloatingScalar,