Struct euler::Vec3 [] [src]

#[repr(C)]
pub struct Vec3 { pub x: f32, pub y: f32, pub z: f32, }

Single-precision 3D vector.

Fields

Methods

impl Vec3
[src]

[src]

Full constructor.

[src]

Zero constructor.

[src]

Returns the XY components of the vector.

impl Vec3
[src]

[src]

Returns the cross product of two vectors.

impl Vec3
[src]

[src]

Returns the dot product of two vectors.

[src]

Returns the length (magnitude) of the vector.

[src]

Returns the squared length of the vector.

[src]

Scales the vector to unit length.

Panics

Panics if the vector is zero.

impl Vec3
[src]

[src]

Returns the acute angle between two vectors.

Panics

Panics if self is the zero vector.

Trait Implementations

impl Clone for Vec3
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Vec3
[src]

impl Debug for Vec3
[src]

[src]

Formats the value using the given formatter.

impl Default for Vec3
[src]

[src]

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

impl PartialEq for Vec3
[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 From<f32> for Vec3
[src]

[src]

Performs the conversion.

impl From<f64> for Vec3
[src]

[src]

Performs the conversion.

impl From<DVec3> for Vec3
[src]

[src]

Performs the conversion.

impl<T: Into<Vec2>> From<(T, f32)> for Vec3
[src]

[src]

Performs the conversion.

impl Display for Vec3
[src]

[src]

Formats the value using the given formatter. Read more

impl Add<Vec3> for Vec3
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl AddAssign<Vec3> for Vec3
[src]

[src]

Performs the += operation.

impl Sub<Vec3> for Vec3
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl SubAssign<Vec3> for Vec3
[src]

[src]

Performs the -= operation.

impl Mul<f32> for Vec3
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl MulAssign<f32> for Vec3
[src]

[src]

Performs the *= operation.

impl Div<f32> for Vec3
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl DivAssign<f32> for Vec3
[src]

[src]

Performs the /= operation.

impl AsRef<[f32; 3]> for Vec3
[src]

[src]

Performs the conversion.

impl From<[f32; 3]> for Vec3
[src]

[src]

Performs the conversion.

impl Into<[f32; 3]> for Vec3
[src]

[src]

Performs the conversion.

impl ApproxEq for Vec3
[src]

Used for specifying relative comparisons.

[src]

The default tolerance to use when testing values that are close together. Read more

[src]

The default relative tolerance for testing values that are far-apart. Read more

[src]

The default ULPs to tolerate when testing values that are far-apart. Read more

[src]

A test for equality that uses a relative comparison if the values are far apart.

[src]

A test for equality that uses units in the last place (ULP) if the values are far apart.

[src]

The inverse of ApproxEq::relative_eq.

[src]

The inverse of ApproxEq::ulps_eq.