Struct siege_math::vector::point::Point2
[−]
[src]
#[repr(C)]pub struct Point2<F>(pub Vec2<F>);
Point vector in 2-dimensions
Methods
impl<F: FullFloat> Point2<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 Point2<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 Point2<F>
[src]
fn clone(&self) -> Point2<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 Point2<F>
[src]
impl<F: PartialEq> PartialEq for Point2<F>
[src]
fn eq(&self, __arg_0: &Point2<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: &Point2<F>) -> bool
[src]
This method tests for !=
.
impl<F: Eq> Eq for Point2<F>
[src]
impl<F: Hash> Hash for Point2<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 Point2<F>
[src]
type Target = Vec2<F>
The resulting type after dereferencing.
fn deref(&self) -> &Vec2<F>
[src]
Dereferences the value.
impl<F: FullFloat> From<Point2<F>> for Vec2<F>
[src]
impl<F: FullFloat> From<Vec2<F>> for Point2<F>
[src]
impl<F: FullFloat> Add<Vec2<F>> for Point2<F>
[src]
type Output = Point2<F>
The resulting type after applying the +
operator.
fn add(self, other: Vec2<F>) -> Point2<F>
[src]
Performs the +
operation.
impl<F: FullFloat> Sub<Vec2<F>> for Point2<F>
[src]
type Output = Point2<F>
The resulting type after applying the -
operator.
fn sub(self, other: Vec2<F>) -> Point2<F>
[src]
Performs the -
operation.
impl<F: FullFloat> Sub<Point2<F>> for Point2<F>
[src]
type Output = Vec2<F>
The resulting type after applying the -
operator.
fn sub(self, other: Point2<F>) -> Vec2<F>
[src]
Performs the -
operation.
impl From<Point2<f64>> for Point2<f32>
[src]
impl From<Point2<f32>> for Point2<f64>
[src]
impl<F: FullFloat> ApproxEq for Point2<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