Struct euler::DVec4 [−][src]
Double-precision 4D vector.
Fields
x: f64
y: f64
z: f64
w: f64
Methods
impl DVec4
[src]
impl DVec4
pub fn new(x: f64, y: f64, z: f64, w: f64) -> Self
[src]
pub fn new(x: f64, y: f64, z: f64, w: f64) -> Self
Full constructor.
pub fn zero() -> Self
[src]
pub fn zero() -> Self
Zero constructor.
pub fn xy(self) -> DVec2
[src]
pub fn xy(self) -> DVec2
Returns the XY components of the vector.
pub fn xyz(self) -> DVec3
[src]
pub fn xyz(self) -> DVec3
Returns the XYZ components of the vector.
impl DVec4
[src]
impl DVec4
pub fn dot(self, rhs: DVec4) -> f64
[src]
pub fn dot(self, rhs: DVec4) -> f64
Returns the dot product of two vectors.
pub fn length(self) -> f64
[src]
pub fn length(self) -> f64
Returns the length (magnitude) of the vector.
pub fn squared_length(self) -> f64
[src]
pub fn squared_length(self) -> f64
Returns the squared length of the vector.
pub fn normalize(self) -> DVec4
[src]
pub fn normalize(self) -> DVec4
Trait Implementations
impl Mul<DVec4> for DMat4
[src]
impl Mul<DVec4> for DMat4
type Output = DVec4
The resulting type after applying the *
operator.
fn mul(self, rhs: DVec4) -> Self::Output
[src]
fn mul(self, rhs: DVec4) -> Self::Output
Performs the *
operation.
impl<'a> Mul<DVec4> for &'a DMat4
[src]
impl<'a> Mul<DVec4> for &'a DMat4
type Output = DVec4
The resulting type after applying the *
operator.
fn mul(self, rhs: DVec4) -> Self::Output
[src]
fn mul(self, rhs: DVec4) -> Self::Output
Performs the *
operation.
impl From<DVec4> for Vec4
[src]
impl From<DVec4> for Vec4
impl Clone for DVec4
[src]
impl Clone for DVec4
fn clone(&self) -> DVec4
[src]
fn clone(&self) -> DVec4
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for DVec4
[src]
impl Copy for DVec4
impl Debug for DVec4
[src]
impl Debug for DVec4
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for DVec4
[src]
impl Default for DVec4
impl PartialEq for DVec4
[src]
impl PartialEq for DVec4
fn eq(&self, other: &DVec4) -> bool
[src]
fn eq(&self, other: &DVec4) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DVec4) -> bool
[src]
fn ne(&self, other: &DVec4) -> bool
This method tests for !=
.
impl From<f32> for DVec4
[src]
impl From<f32> for DVec4
impl From<f64> for DVec4
[src]
impl From<f64> for DVec4
impl From<Vec4> for DVec4
[src]
impl From<Vec4> for DVec4
impl<T: Into<DVec2>> From<(T, f64, f64)> for DVec4
[src]
impl<T: Into<DVec2>> From<(T, f64, f64)> for DVec4
impl<T: Into<DVec3>> From<(T, f64)> for DVec4
[src]
impl<T: Into<DVec3>> From<(T, f64)> for DVec4
impl Display for DVec4
[src]
impl Display for DVec4
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Add<DVec4> for DVec4
[src]
impl Add<DVec4> for DVec4
type Output = DVec4
The resulting type after applying the +
operator.
fn add(self, rhs: DVec4) -> Self::Output
[src]
fn add(self, rhs: DVec4) -> Self::Output
Performs the +
operation.
impl AddAssign<DVec4> for DVec4
[src]
impl AddAssign<DVec4> for DVec4
fn add_assign(&mut self, rhs: DVec4)
[src]
fn add_assign(&mut self, rhs: DVec4)
Performs the +=
operation.
impl Sub<DVec4> for DVec4
[src]
impl Sub<DVec4> for DVec4
type Output = DVec4
The resulting type after applying the -
operator.
fn sub(self, rhs: DVec4) -> Self::Output
[src]
fn sub(self, rhs: DVec4) -> Self::Output
Performs the -
operation.
impl SubAssign<DVec4> for DVec4
[src]
impl SubAssign<DVec4> for DVec4
fn sub_assign(&mut self, rhs: DVec4)
[src]
fn sub_assign(&mut self, rhs: DVec4)
Performs the -=
operation.
impl Mul<DVec4> for f64
[src]
impl Mul<DVec4> for f64
type Output = DVec4
The resulting type after applying the *
operator.
fn mul(self, arg: DVec4) -> Self::Output
[src]
fn mul(self, arg: DVec4) -> Self::Output
Performs the *
operation.
impl Mul<f64> for DVec4
[src]
impl Mul<f64> for DVec4
type Output = DVec4
The resulting type after applying the *
operator.
fn mul(self, arg: f64) -> Self::Output
[src]
fn mul(self, arg: f64) -> Self::Output
Performs the *
operation.
impl MulAssign<f64> for DVec4
[src]
impl MulAssign<f64> for DVec4
fn mul_assign(&mut self, rhs: f64)
[src]
fn mul_assign(&mut self, rhs: f64)
Performs the *=
operation.
impl Div<f64> for DVec4
[src]
impl Div<f64> for DVec4
type Output = DVec4
The resulting type after applying the /
operator.
fn div(self, arg: f64) -> Self::Output
[src]
fn div(self, arg: f64) -> Self::Output
Performs the /
operation.
impl DivAssign<f64> for DVec4
[src]
impl DivAssign<f64> for DVec4
fn div_assign(&mut self, rhs: f64)
[src]
fn div_assign(&mut self, rhs: f64)
Performs the /=
operation.
impl AsRef<[f64; 4]> for DVec4
[src]
impl AsRef<[f64; 4]> for DVec4
impl From<[f64; 4]> for DVec4
[src]
impl From<[f64; 4]> for DVec4
impl Into<[f64; 4]> for DVec4
[src]
impl Into<[f64; 4]> for DVec4
impl ApproxEq for DVec4
[src]
impl ApproxEq for DVec4
type Epsilon = <Vector4<f64> as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
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]
fn relative_eq(
&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]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
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]
fn relative_ne(
&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]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.