Struct liquidfun::box2d::common::math::Vec2 [] [src]

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

A 2D column vector.

Fields

x
y

Methods

impl Vec2

fn new(x: f32, y: f32) -> Vec2

Construct using coordinates.

fn set(&mut self, x: f32, y: f32)

Set this vector to some specified coordinates.

fn zero() -> Vec2

Construct a vector with all zero coordinates.

Trait Implementations

Derived Implementations

impl Clone for Vec2

fn clone(&self) -> Vec2

fn clone_from(&mut self, source: &Self)

impl Copy for Vec2

impl Default for Vec2

fn default() -> Vec2

impl PartialEq for Vec2

fn eq(&self, __arg_0: &Vec2) -> bool

fn ne(&self, __arg_0: &Vec2) -> bool

impl Debug for Vec2

fn fmt(&self, __arg_0: &mut Formatter) -> Result