[][src]Struct torophy::math::vec2::Vec2

pub struct Vec2 {
    pub x: f32,
    pub y: f32,
}

Fields

x: f32y: f32

Implementations

impl Vec2[src]

pub fn zero() -> Vec2[src]

pub fn xy(x: f32, y: f32) -> Vec2[src]

pub fn x(x: f32) -> Vec2[src]

pub fn y(y: f32) -> Vec2[src]

pub fn from_angle(angle: f32) -> Vec2[src]

pub fn clear(&mut self)[src]

pub fn length(&self) -> f32[src]

pub fn square_length(&self) -> f32[src]

Trait Implementations

impl Add<Vec2> for Vec2[src]

type Output = Vec2

The resulting type after applying the + operator.

impl AddAssign<Vec2> for Vec2[src]

impl Clone for Vec2[src]

impl Copy for Vec2[src]

impl Debug for Vec2[src]

impl Div<f32> for Vec2[src]

type Output = Vec2

The resulting type after applying the / operator.

impl DivAssign<f32> for Vec2[src]

impl Mul<Vec2> for Vec2[src]

type Output = f32

The resulting type after applying the * operator.

impl Mul<f32> for Vec2[src]

type Output = Vec2

The resulting type after applying the * operator.

impl MulAssign<f32> for Vec2[src]

impl Neg for Vec2[src]

type Output = Vec2

The resulting type after applying the - operator.

impl PartialEq<Vec2> for Vec2[src]

impl StructuralPartialEq for Vec2[src]

impl Sub<Vec2> for Vec2[src]

type Output = Vec2

The resulting type after applying the - operator.

impl SubAssign<Vec2> for Vec2[src]

Auto Trait Implementations

impl RefUnwindSafe for Vec2

impl Send for Vec2

impl Sync for Vec2

impl Unpin for Vec2

impl UnwindSafe for Vec2

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.