Struct siege_math::vector::direction::Direction2
[−]
[src]
#[repr(C)]pub struct Direction2<F>(_);
Direction vector in 2-dimensions (normalized)
Methods
impl<F: FullFloat> Direction2<F>
[src]
pub fn new_isnormal(x: F, y: F) -> Direction2<F>
[src]
Methods from Deref<Target = Vec2<F>>
pub fn squared_magnitude(&self) -> F
[src]
pub fn project_onto(&self, axis: Vec2<F>) -> Vec2<F>
[src]
pub fn reject_onto(&self, axis: Vec2<F>) -> Vec2<F>
[src]
Trait Implementations
impl<F: Debug> Debug for Direction2<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 Direction2<F>
[src]
fn clone(&self) -> Direction2<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 Direction2<F>
[src]
impl<F: PartialEq> PartialEq for Direction2<F>
[src]
fn eq(&self, __arg_0: &Direction2<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: &Direction2<F>) -> bool
[src]
This method tests for !=
.
impl<F: Eq> Eq for Direction2<F>
[src]
impl<F: Hash> Hash for Direction2<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 Direction2<F>
[src]
type Target = Vec2<F>
The resulting type after dereferencing.
fn deref(&self) -> &Vec2<F>
[src]
Dereferences the value.
impl<F: FullFloat> From<Direction2<F>> for Vec2<F>
[src]
fn from(v: Direction2<F>) -> Vec2<F>
[src]
Performs the conversion.
impl<F: FullFloat> From<Vec2<F>> for Direction2<F>
[src]
fn from(v: Vec2<F>) -> Direction2<F>
[src]
Performs the conversion.
impl<F: FullFloat> ApproxEq for Direction2<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 Direction2<F> where
F: Send,
F: Send,
impl<F> Sync for Direction2<F> where
F: Sync,
F: Sync,