pub struct Vector<T = FloatNum>{ /* private fields */ }Implementations§
Source§impl Vector<f32>
impl Vector<f32>
pub fn abs(&self) -> f32
pub fn normalize(&self) -> Vector<f32>
pub fn rad(&self, vector: &Vector<f32>) -> f32
pub fn affine_transformation_rotate(&self, rad: f32) -> Vector<f32>
pub fn affine_transformation_rotate_self(&mut self, rad: f32)
pub fn is_zero(&self) -> bool
pub fn set_zero(&mut self)
Source§impl Vector<f64>
impl Vector<f64>
pub fn abs(&self) -> f64
pub fn normalize(&self) -> Vector<f64>
pub fn rad(&self, vector: &Vector<f64>) -> f64
pub fn affine_transformation_rotate(&self, rad: f64) -> Vector<f64>
pub fn affine_transformation_rotate_self(&mut self, rad: f64)
pub fn is_zero(&self) -> bool
pub fn set_zero(&mut self)
Trait Implementations§
Source§impl<T> AddAssign<&Vector<T>> for Point<T>
impl<T> AddAssign<&Vector<T>> for Point<T>
Source§fn add_assign(&mut self, rhs: &Vector<T>)
fn add_assign(&mut self, rhs: &Vector<T>)
Performs the
+= operation. Read moreSource§impl<T> AddAssign<&Vector<T>> for Vector<T>
impl<T> AddAssign<&Vector<T>> for Vector<T>
Source§fn add_assign(&mut self, rhs: &Vector<T>)
fn add_assign(&mut self, rhs: &Vector<T>)
Performs the
+= operation. Read moreSource§impl<T> AddAssign<Vector<T>> for Point<T>
impl<T> AddAssign<Vector<T>> for Point<T>
Source§fn add_assign(&mut self, rhs: Vector<T>)
fn add_assign(&mut self, rhs: Vector<T>)
Performs the
+= operation. Read moreSource§impl<T> AddAssign for Vector<T>
impl<T> AddAssign for Vector<T>
Source§fn add_assign(&mut self, rhs: Vector<T>)
fn add_assign(&mut self, rhs: Vector<T>)
Performs the
+= operation. Read moreSource§impl<T> DivAssign<&T> for Vector<T>
impl<T> DivAssign<&T> for Vector<T>
Source§fn div_assign(&mut self, rhs: &T)
fn div_assign(&mut self, rhs: &T)
Performs the
/= operation. Read moreSource§impl<T> DivAssign<T> for Vector<T>
impl<T> DivAssign<T> for Vector<T>
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/= operation. Read moreSource§impl From<AxisDirection> for Vector<f32>
impl From<AxisDirection> for Vector<f32>
Source§fn from(axis: AxisDirection) -> Self
fn from(axis: AxisDirection) -> Self
Converts to this type from the input type.
Source§impl From<AxisDirection> for Vector<f64>
impl From<AxisDirection> for Vector<f64>
Source§fn from(axis: AxisDirection) -> Self
fn from(axis: AxisDirection) -> Self
Converts to this type from the input type.
Source§impl<T> MulAssign<T> for Vector<T>
impl<T> MulAssign<T> for Vector<T>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*= operation. Read moreSource§impl<T> MulAssign for Vector<T>
impl<T> MulAssign for Vector<T>
Source§fn mul_assign(&mut self, rhs: Vector<T>)
fn mul_assign(&mut self, rhs: Vector<T>)
Performs the
*= operation. Read moreSource§impl<T> SubAssign<&Vector<T>> for Point<T>
impl<T> SubAssign<&Vector<T>> for Point<T>
Source§fn sub_assign(&mut self, rhs: &Vector<T>)
fn sub_assign(&mut self, rhs: &Vector<T>)
Performs the
-= operation. Read moreSource§impl<T> SubAssign<&Vector<T>> for Vector<T>
impl<T> SubAssign<&Vector<T>> for Vector<T>
Source§fn sub_assign(&mut self, rhs: &Vector<T>)
fn sub_assign(&mut self, rhs: &Vector<T>)
Performs the
-= operation. Read moreSource§impl<T> SubAssign<Vector<T>> for Point<T>
impl<T> SubAssign<Vector<T>> for Point<T>
Source§fn sub_assign(&mut self, rhs: Vector<T>)
fn sub_assign(&mut self, rhs: Vector<T>)
Performs the
-= operation. Read moreSource§impl<T> SubAssign for Vector<T>
impl<T> SubAssign for Vector<T>
Source§fn sub_assign(&mut self, rhs: Vector<T>)
fn sub_assign(&mut self, rhs: Vector<T>)
Performs the
-= operation. Read moreimpl<T> Copy for Vector<T>
Auto Trait Implementations§
impl<T> Freeze for Vector<T>where
T: Freeze,
impl<T> RefUnwindSafe for Vector<T>where
T: RefUnwindSafe,
impl<T> Send for Vector<T>where
T: Send,
impl<T> Sync for Vector<T>where
T: Sync,
impl<T> Unpin for Vector<T>where
T: Unpin,
impl<T> UnwindSafe for Vector<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