Struct gardiz::direc::DirecVector
source · pub struct DirecVector<T> {
pub magnitude: T,
pub direction: Direction,
}
Expand description
A vector written as a magnitude and a direction.
Fields§
§magnitude: T
Mangitude, should be numeric.
direction: Direction
Direction of the vector.
Trait Implementations§
source§impl<T: Clone> Clone for DirecVector<T>
impl<T: Clone> Clone for DirecVector<T>
source§fn clone(&self) -> DirecVector<T>
fn clone(&self) -> DirecVector<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for DirecVector<T>
impl<T: Debug> Debug for DirecVector<T>
source§impl<'de, T> Deserialize<'de> for DirecVector<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for DirecVector<T>where T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Hash> Hash for DirecVector<T>
impl<T: Hash> Hash for DirecVector<T>
source§impl<T: Ord> Ord for DirecVector<T>
impl<T: Ord> Ord for DirecVector<T>
source§fn cmp(&self, other: &DirecVector<T>) -> Ordering
fn cmp(&self, other: &DirecVector<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<DirecVector<T>> for DirecVector<T>
impl<T: PartialEq> PartialEq<DirecVector<T>> for DirecVector<T>
source§fn eq(&self, other: &DirecVector<T>) -> bool
fn eq(&self, other: &DirecVector<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd<DirecVector<T>> for DirecVector<T>
impl<T: PartialOrd> PartialOrd<DirecVector<T>> for DirecVector<T>
source§fn partial_cmp(&self, other: &DirecVector<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &DirecVector<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more