[−][src]Trait vector2math::FloatingVector2
Trait for manipulating floating-point 2D vectors
Provided methods
fn dist(self, to: Self) -> 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(self, radians: Self::Scalar) -> Self
Rotate the vector some number of radians about the origin
fn rotate_about(self, radians: Self::Scalar, pivot: Self) -> Self
Rotate the vector some number of radians about a pivot
fn lerp(self, other: Self, t: Self::Scalar) -> Self
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 π
fn transform<T>(self, transform: T) -> Self where
T: Transform<Scalar = Self::Scalar>,
T: Transform<Scalar = Self::Scalar>,
Apply a transform to the vector
Implementors
impl<T> FloatingVector2 for T where
T: Vector2,
T::Scalar: FloatingScalar,
[src]
T: Vector2,
T::Scalar: FloatingScalar,