Struct euler::Vec4
[−]
[src]
#[repr(C)]pub struct Vec4 { pub x: f32, pub y: f32, pub z: f32, pub w: f32, }
4D vector.
Fields
x: f32
X co-ordinate.
y: f32
Y co-ordinate.
z: f32
Z co-ordinate.
w: f32
Homogeneous W co-ordinate.
Methods
impl Vec4
[src]
fn dot(self, other: Vec4) -> f32
[src]
Returns the dot product of two vectors.
fn xyz(self) -> Vec3
[src]
Returns the XYZ components of the vector.
Trait Implementations
impl Clone for Vec4
[src]
fn clone(&self) -> Vec4
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Vec4
[src]
impl Debug for Vec4
[src]
impl PartialEq for Vec4
[src]
fn eq(&self, __arg_0: &Vec4) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vec4) -> bool
[src]
This method tests for !=
.
impl AsRef<[f32; 4]> for Vec4
[src]
impl From<[f32; 4]> for Vec4
[src]
impl Into<[f32; 4]> for Vec4
[src]
impl Mul<f32> for Vec4
[src]
type Output = Vec4
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self::Output
[src]
Performs the *
operation.
impl Div<f32> for Vec4
[src]
type Output = Vec4
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> Self::Output
[src]
Performs the /
operation.
impl Add<Vec4> for Vec4
[src]
type Output = Vec4
The resulting type after applying the +
operator.
fn add(self, rhs: Vec4) -> Self::Output
[src]
Performs the +
operation.
impl Sub<Vec4> for Vec4
[src]
type Output = Vec4
The resulting type after applying the -
operator.
fn sub(self, rhs: Vec4) -> Self::Output
[src]
Performs the -
operation.
impl ApproxEq for Vec4
[src]
type Epsilon = <f32 as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.