Struct mathf::vector3::Vector3 [] [src]

pub struct Vector3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

A 3D Vector with x, y, z coordinates: Vector3

Fields

Methods

impl Vector3
[src]

[src]

Instantiates a new vector with to be defined values of x, y, z;

[src]

Instantiates a new Vector3 from 2 Point3 (initial position, final position). The new vector is created as final - initial (Points)

[src]

Defines a Vector with UP direction (y=1, x=0, z=0)

[src]

Defines a Vector with DOWN direction (y=-1, x=0, z=0)

[src]

Defines a Vector with RIGHT direction (y=0, x=1, z=0)

[src]

Defines a Vector with LEFT direction (y=0, x=-1, z=0)

[src]

Defines a Vector with FOWARD direction (y=0, x=0, z=1)

[src]

Defines a Vector with BACK direction (y=0, x=0, z=-1)

[src]

Defines a 3D Vector with x=1, y=1, z=1

[src]

Defines a Modulus ZERO Vector (x=0, y=0, z=0)

[src]

Vector magnitude: the square root of the sum of each vector part to the power of 2

[src]

Crooss product between two vectors 3.

Trait Implementations

impl Clone for Vector3
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Vector3
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Vector3
[src]

[src]

Formats the value using the given formatter.

impl Add for Vector3
[src]

The resulting type after applying the + operator.

[src]

Implements the Vector3 '+' trait

impl Mul<f32> for Vector3
[src]

The resulting type after applying the * operator.

[src]

Implements the scalar multiplication of a Vector3 with a f32. Other numbers should be passed with 'i as f32'

impl Mul<Vector3> for Vector3
[src]

The resulting type after applying the * operator.

[src]

Implements the dot product of 2 Vector3 as '*'.

impl Sub for Vector3
[src]

The resulting type after applying the - operator.

[src]

Implements the Vector3 '-' trait