pub struct AxisVector<T>{
pub x: T,
pub y: T,
/* private fields */
}
Expand description
Describes a vector in terms of its 2 2d axis magnitudes, used often to describe transforms and offsets
Fields§
§x: T
§y: T
Implementations§
Source§impl AxisVector<f64>
impl AxisVector<f64>
pub fn scale(&self, scalar: f64) -> AxisVector<f64>
Trait Implementations§
Source§impl<T> Add for AxisVector<T>
impl<T> Add for AxisVector<T>
Source§type Output = AxisVector<T>
type Output = AxisVector<T>
The resulting type after applying the
+
operator.Source§fn add(self, rhs: AxisVector<T>) -> AxisVector<T>
fn add(self, rhs: AxisVector<T>) -> AxisVector<T>
Performs the
+
operation. Read moreSource§impl<T> Clone for AxisVector<T>
impl<T> Clone for AxisVector<T>
Source§fn clone(&self) -> AxisVector<T>
fn clone(&self) -> AxisVector<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> Default for AxisVector<T>
impl<T> Default for AxisVector<T>
Source§fn default() -> AxisVector<T>
fn default() -> AxisVector<T>
Returns the “default value” for a type. Read more
Source§impl<T> Display for AxisVector<T>
impl<T> Display for AxisVector<T>
impl<T> Copy for AxisVector<T>
Auto Trait Implementations§
impl<T> Freeze for AxisVector<T>where
T: Freeze,
impl<T> RefUnwindSafe for AxisVector<T>where
T: RefUnwindSafe,
impl<T> Send for AxisVector<T>where
T: Send,
impl<T> Sync for AxisVector<T>where
T: Sync,
impl<T> Unpin for AxisVector<T>where
T: Unpin,
impl<T> UnwindSafe for AxisVector<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more