Struct matriarch::Vec4[][src]

pub struct Vec4 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
    pub w: f32,
}

A 4D Vector with elements x, y, z, and w

Fields

Methods

impl Vec4
[src]

Returns a new Vec4 at [0, 0, 0, 0].

Returns a new Vec4 using the given values for x, y, z, and w.

Returns a new Vec4 using the 0, 1, 2, and 3 indices of the given array, where [0] -> x, [1] -> y, [2] -> z, and [3] -> w.

Returns an array of the Vec4's x, y, z, and w values where x -> [0], y -> [1], z -> [2], and w -> [3].

Returns the length of the Vec4.

Trait Implementations

impl Mul<Vec4> for Mat4
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Clone for Vec4
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Vec4
[src]

impl Debug for Vec4
[src]

Formats the value using the given formatter. Read more

impl Default for Vec4
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Vec4
[src]

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

This method tests for !=.

impl Add<Vec4> for Vec4
[src]

The resulting type after applying the + operator.

Adds one Vec4 to another Vec4 and returns a new Vec4.

impl AddAssign for Vec4
[src]

Adds one Vec4 to another Vec4 and re-assigns the first Vec4 to the new Vec4.

impl Mul<Vec4> for f32
[src]

The resulting type after applying the * operator.

Multiplise a scalar value by a Vec4 and returns a Vec4.

impl Mul<Vec4> for Vec4
[src]

The resulting type after applying the * operator.

Returns the dot product of 2 Vec4s, which is a scalar floating point.

impl Neg for Vec4
[src]

The resulting type after applying the - operator.

Negates the values of Vec4, which in turn negates the Vec4.

impl Sub<Vec4> for Vec4
[src]

The resulting type after applying the - operator.

Subtracts one Vec4 from another Vec4 and returns a new Vec4.

impl SubAssign for Vec4
[src]

Subtracts one Vec4 from another Vec4 and re-assigns the first Vec4 to the new Vec4.

Auto Trait Implementations

impl Send for Vec4

impl Sync for Vec4