[][src]Trait vector2math::FloatingVector2

pub trait FloatingVector2: Vector2 where
    Self::Scalar: FloatingScalar
{ fn dist<V>(self, to: V) -> Self::Scalar
    where
        V: Vector2<Scalar = Self::Scalar>
, { ... }
fn mag(self) -> Self::Scalar { ... }
fn rotate_about<V>(self, pivot: V, radians: Self::Scalar) -> Self
    where
        V: Vector2<Scalar = Self::Scalar> + Clone
, { ... } }

Trait for manipulating floating-point 2D vectors

Provided methods

fn dist<V>(self, to: V) -> Self::Scalar where
    V: Vector2<Scalar = Self::Scalar>, 

Get the distance between this vector and another

fn mag(self) -> Self::Scalar

Get the vector's magnitude

fn rotate_about<V>(self, pivot: V, radians: Self::Scalar) -> Self where
    V: Vector2<Scalar = Self::Scalar> + Clone

Rotate the vector some number of radians about a pivot

Loading content...

Implementors

impl<T> FloatingVector2 for T where
    T: Vector2,
    T::Scalar: FloatingScalar
[src]

fn dist<V>(self, to: V) -> Self::Scalar where
    V: Vector2<Scalar = Self::Scalar>, 
[src]

fn mag(self) -> Self::Scalar
[src]

fn rotate_about<V>(self, pivot: V, radians: Self::Scalar) -> Self where
    V: Vector2<Scalar = Self::Scalar> + Clone
[src]

Loading content...