Struct dumbmath::vec3f::Vec3f [] [src]

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

Vector with three f32 components

Fields

Methods

impl Vec3f
[src]

Create a Vec3f from three components

Create a Vec3f with all components set to the same scalar

Inner product

Cross product

Distance to another point

Linearly interpolate between two points by the factor t. When t is zero the result is self, and when t is one the result is p. The range of t is not clamped.

Squared length of the vector

Length of the vector

Create a normalized copy, or None if the magnitude is zero

Projection of self into v, or None if the magnitude of b is zero.

Trait Implementations

impl Clone for Vec3f
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Vec3f
[src]

impl Debug for Vec3f
[src]

Formats the value using the given formatter.

impl PartialEq for Vec3f
[src]

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

This method tests for !=.

impl Add for Vec3f
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<f32> for Vec3f
[src]

The resulting type after applying the + operator

The method for the + operator

impl Div for Vec3f
[src]

The resulting type after applying the / operator

The method for the / operator

impl Mul<Vec3f> for Vec3f
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<f32> for Vec3f
[src]

The resulting type after applying the * operator

The method for the * operator

impl Sub for Vec3f
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<f32> for Vec3f
[src]

The resulting type after applying the - operator

The method for the - operator