Struct siege_math::vector::direction::Direction3
[−]
[src]
#[repr(C)]pub struct Direction3<F>(_);
Direction vector in 3-dimensions (normalized)
Methods
impl<F: FullFloat> Direction3<F>
[src]
pub fn new_isnormal(x: F, y: F, z: F) -> Direction3<F>
[src]
impl<F: FullFloat> Direction3<F>
[src]
pub fn cross(&self, rhs: Direction3<F>) -> Vec3<F>
[src]
impl<F: FullFloat> Direction3<F>
[src]
pub fn dot(&self, rhs: Direction3<F>) -> F
[src]
impl<F: FullFloat> Direction3<F>
[src]
pub fn from_lat_long(latitude: Angle<F>, longitude: Angle<F>) -> Direction3<F>
[src]
pub fn to_lat_long(&self) -> (Angle<F>, Angle<F>)
[src]
Methods from Deref<Target = Vec3<F>>
pub fn truncate_n(&self, n: usize) -> Vec2<F>
[src]
pub fn truncate_x(&self) -> Vec2<F>
[src]
pub fn truncate_y(&self) -> Vec2<F>
[src]
pub fn truncate_z(&self) -> Vec2<F>
[src]
pub fn squared_magnitude(&self) -> F
[src]
pub fn project_onto(&self, axis: Vec3<F>) -> Vec3<F>
[src]
pub fn reject_onto(&self, axis: Vec3<F>) -> Vec3<F>
[src]
pub fn triple_product(&self, b: Vec3<F>, c: Vec3<F>) -> F
[src]
Trait Implementations
impl<F: Debug> Debug for Direction3<F>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Clone> Clone for Direction3<F>
[src]
fn clone(&self) -> Direction3<F>
[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<F: Copy> Copy for Direction3<F>
[src]
impl<F: PartialEq> PartialEq for Direction3<F>
[src]
fn eq(&self, __arg_0: &Direction3<F>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Direction3<F>) -> bool
[src]
This method tests for !=
.
impl<F: Eq> Eq for Direction3<F>
[src]
impl<F: Hash> Hash for Direction3<F>
[src]
fn hash<__HF: Hasher>(&self, __arg_0: &mut __HF)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<F: FullFloat> Deref for Direction3<F>
[src]
type Target = Vec3<F>
The resulting type after dereferencing.
fn deref(&self) -> &Vec3<F>
[src]
Dereferences the value.
impl<F: FullFloat> From<Direction3<F>> for Vec3<F>
[src]
fn from(v: Direction3<F>) -> Vec3<F>
[src]
Performs the conversion.
impl<F: FullFloat> From<Direction3<F>> for Vec4<F>
[src]
fn from(v: Direction3<F>) -> Vec4<F>
[src]
Performs the conversion.
impl<F: FullFloat> From<Vec3<F>> for Direction3<F>
[src]
fn from(v: Vec3<F>) -> Direction3<F>
[src]
Performs the conversion.
impl<F: FullFloat> Neg for Direction3<F>
[src]
type Output = Direction3<F>
The resulting type after applying the -
operator.
fn neg(self) -> Direction3<F>
[src]
Performs the unary -
operation.
impl<F: FullFloat> ApproxEq for Direction3<F>
[src]
type Flt = F
fn approx_eq(
&self,
other: &Self,
epsilon: <F as ApproxEq>::Flt,
ulps: <<F as ApproxEq>::Flt as Ulps>::U
) -> bool
[src]
&self,
other: &Self,
epsilon: <F as ApproxEq>::Flt,
ulps: <<F as ApproxEq>::Flt as Ulps>::U
) -> bool
This method tests for self
and other
values to be approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more
fn approx_ne(
&self,
other: &Self,
epsilon: Self::Flt,
ulps: <Self::Flt as Ulps>::U
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Flt,
ulps: <Self::Flt as Ulps>::U
) -> bool
This method tests for self
and other
values to be not approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more
Auto Trait Implementations
impl<F> Send for Direction3<F> where
F: Send,
F: Send,
impl<F> Sync for Direction3<F> where
F: Sync,
F: Sync,