Struct xmath::Vector2 [] [src]

pub struct Vector2 {
    pub x: f32,
    pub y: f32,
    // some fields omitted
}

Fields

x: f32 y: f32

Methods

impl Vector2
[src]

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

Trait Implementations

impl Debug for Vector2
[src]

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

Formats the value using the given formatter.

impl PartialEq for Vector2
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Copy for Vector2
[src]

impl Clone for Vector2
[src]

fn clone(&self) -> Vector2

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Vector for Vector2
[src]

fn zero() -> Self

fn one() -> Self

fn infinity() -> Self

fn nan() -> Self

fn epsilon() -> Self

fn replicate(value: f32) -> Self

fn swizzle(&self, e0: usize, e1: usize, _e2: usize, _e3: usize) -> Self

fn permute(&self, other: &Self, permute_x: usize, permute_y: usize, _permute_z: usize, _permute_w: usize) -> Self

fn transform(&self, matrix: &Matrix) -> Self

fn min(&self, other: &Self) -> Self

fn max(&self, other: &Self) -> Self

fn round(&self) -> Self

fn trunc(&self) -> Self

fn floor(&self) -> Self

fn ceil(&self) -> Self

fn clamp(&self, min: &Self, max: &Self) -> Self

fn multiply_add(&self, mul: &Self, add: &Self) -> Self

fn splat_x(&self) -> Self

fn splat_y(&self) -> Self

fn splat_z(&self) -> Self

fn splat_w(&self) -> Self

impl Add for Vector2
[src]

type Output = Self

The resulting type after applying the + operator

fn add(self, rhs: Vector2) -> Self::Output

The method for the + operator

impl AddAssign for Vector2
[src]

fn add_assign(&mut self, rhs: Self)

The method for the += operator

impl Sub for Vector2
[src]

type Output = Self

The resulting type after applying the - operator

fn sub(self, rhs: Vector2) -> Self::Output

The method for the - operator

impl SubAssign for Vector2
[src]

fn sub_assign(&mut self, rhs: Self)

The method for the -= operator

impl Div for Vector2
[src]

type Output = Self

The resulting type after applying the / operator

fn div(self, rhs: Vector2) -> Self::Output

The method for the / operator

impl DivAssign for Vector2
[src]

fn div_assign(&mut self, rhs: Self)

The method for the /= operator

impl Div<f32> for Vector2
[src]

type Output = Self

The resulting type after applying the / operator

fn div(self, rhs: f32) -> Self::Output

The method for the / operator

impl DivAssign<f32> for Vector2
[src]

fn div_assign(&mut self, rhs: f32)

The method for the /= operator

impl Mul for Vector2
[src]

type Output = Self

The resulting type after applying the * operator

fn mul(self, rhs: Vector2) -> Self::Output

The method for the * operator

impl MulAssign for Vector2
[src]

fn mul_assign(&mut self, rhs: Self)

The method for the *= operator

impl Mul<f32> for Vector2
[src]

type Output = Self

The resulting type after applying the * operator

fn mul(self, rhs: f32) -> Self::Output

The method for the * operator

impl MulAssign<f32> for Vector2
[src]

fn mul_assign(&mut self, rhs: f32)

The method for the *= operator

impl Neg for Vector2
[src]

type Output = Self

The resulting type after applying the - operator

fn neg(self) -> Self::Output

The method for the unary - operator

impl Index<usize> for Vector2
[src]

type Output = f32

The returned type after indexing

fn index<'a>(&'a self, index: usize) -> &'a Self::Output

The method for the indexing (Foo[Bar]) operation

impl From<Row> for Vector2
[src]

fn from(row: Row) -> Self

Performs the conversion.