[][src]Struct hektor::Vec2

pub struct Vec2 { /* fields omitted */ }

Two-dimensional vector: x and y.

Internally, this is two f32 values.

Methods

impl Vec2[src]

pub fn x(self) -> f32[src]

x component

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

x component unique reference

pub fn y(self) -> f32[src]

y component

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

y component unique reference

pub fn xx(self) -> Self[src]

Swizzle: xx

pub fn xy(self) -> Self[src]

Swizzle: xy

pub fn yx(self) -> Self[src]

Swizzle: yx

pub fn yy(self) -> Self[src]

Swizzle: yy

pub fn abs(self) -> Self[src]

Component-wise absolute value.

Trait Implementations

impl CanAbs for Vec2[src]

impl Debug for Vec2[src]

impl Copy for Vec2[src]

impl From<[f32; 2]> for Vec2[src]

impl From<(f32, f32)> for Vec2[src]

impl Clone for Vec2[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Vec2[src]

impl Zeroable for Vec2[src]

fn zeroed() -> Self[src]

Calls zeroed. Read more

impl Pod for Vec2[src]

Auto Trait Implementations

impl Unpin for Vec2

impl Send for Vec2

impl Sync for Vec2

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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