[][src]Struct c2::Vec2

pub struct Vec2(_);

A 2d vector

Implementations

impl Vec2[src]

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

Creates a new vector

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

The x coordinate

pub fn set_x(&mut self, x: f32)[src]

Set the x coordinate

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

The y coordinate

pub fn set_y(&mut self, y: f32)[src]

Set the y coordinate

Trait Implementations

impl Clone for Vec2[src]

impl Copy for Vec2[src]

impl Debug for Vec2[src]

impl From<[f32; 2]> 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.