Struct euler::DVec4
[−]
[src]
#[repr(C)]pub struct DVec4 { pub x: f64, pub y: f64, pub z: f64, pub w: f64, }
Double-precision 4D vector.
Fields
x: f64
y: f64
z: f64
w: f64
Methods
impl DVec4
[src]
fn new(x: f64, y: f64, z: f64, w: f64) -> Self
[src]
Full constructor.
fn zero() -> Self
[src]
Zero constructor.
fn xy(self) -> DVec2
[src]
Returns the XY components of the vector.
fn xyz(self) -> DVec3
[src]
Returns the XYZ components of the vector.
impl DVec4
[src]
fn dot(self, rhs: DVec4) -> f64
[src]
Returns the dot product of two vectors.
fn length(self) -> f64
[src]
Returns the length (magnitude) of the vector.
fn squared_length(self) -> f64
[src]
Returns the squared length of the vector.
fn normalize(self) -> DVec4
[src]
Trait Implementations
impl Clone for DVec4
[src]
fn clone(&self) -> DVec4
[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 DVec4
[src]
impl Debug for DVec4
[src]
impl Default for DVec4
[src]
impl PartialEq for DVec4
[src]
fn eq(&self, __arg_0: &DVec4) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DVec4) -> bool
[src]
This method tests for !=
.
impl From<f32> for DVec4
[src]
impl From<f64> for DVec4
[src]
impl From<Vec4> for DVec4
[src]
impl<T: Into<DVec2>> From<(T, f64, f64)> for DVec4
[src]
impl<T: Into<DVec3>> From<(T, f64)> for DVec4
[src]
impl Display for DVec4
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Add<DVec4> for DVec4
[src]
type Output = DVec4
The resulting type after applying the +
operator.
fn add(self, rhs: DVec4) -> Self::Output
[src]
Performs the +
operation.
impl AddAssign<DVec4> for DVec4
[src]
fn add_assign(&mut self, rhs: DVec4)
[src]
Performs the +=
operation.
impl Sub<DVec4> for DVec4
[src]
type Output = DVec4
The resulting type after applying the -
operator.
fn sub(self, rhs: DVec4) -> Self::Output
[src]
Performs the -
operation.
impl SubAssign<DVec4> for DVec4
[src]
fn sub_assign(&mut self, rhs: DVec4)
[src]
Performs the -=
operation.
impl Mul<f64> for DVec4
[src]
type Output = DVec4
The resulting type after applying the *
operator.
fn mul(self, arg: f64) -> Self::Output
[src]
Performs the *
operation.
impl MulAssign<f64> for DVec4
[src]
fn mul_assign(&mut self, rhs: f64)
[src]
Performs the *=
operation.
impl Div<f64> for DVec4
[src]
type Output = DVec4
The resulting type after applying the /
operator.
fn div(self, arg: f64) -> Self::Output
[src]
Performs the /
operation.
impl DivAssign<f64> for DVec4
[src]
fn div_assign(&mut self, rhs: f64)
[src]
Performs the /=
operation.
impl AsRef<[f64; 4]> for DVec4
[src]
impl From<[f64; 4]> for DVec4
[src]
impl Into<[f64; 4]> for DVec4
[src]
impl ApproxEq for DVec4
[src]
type Epsilon = <Vector4<f64> 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
.