pub struct FusionVector {
pub x: f32,
pub y: f32,
pub z: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
Implementations§
Source§impl FusionVector
impl FusionVector
pub fn get(&self, x: &mut f32, y: &mut f32, z: &mut f32)
pub fn new(x: f32, y: f32, z: f32) -> Self
pub fn zero() -> Self
pub fn ones() -> Self
pub fn is_zero(&self) -> bool
pub fn sum(&self) -> f32
pub fn cross_product(&self, rhs: &Self) -> Self
pub fn dot_product(&self, rhs: &Self) -> f32
pub fn magnitude_squared(&self, rhs: &Self) -> f32
pub fn magnitude(&self) -> f32
pub fn normalize(&self) -> Self
Trait Implementations§
Source§impl Add for FusionVector
impl Add for FusionVector
Source§impl AddAssign for FusionVector
impl AddAssign for FusionVector
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for FusionVector
impl Clone for FusionVector
Source§fn clone(&self) -> FusionVector
fn clone(&self) -> FusionVector
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 Into<FusionVector> for Vector3<f32>
impl Into<FusionVector> for Vector3<f32>
Source§fn into(self) -> FusionVector
fn into(self) -> FusionVector
Converts this type into the (usually inferred) input type.
Source§impl Mul<FusionVector> for FusionMatrix
impl Mul<FusionVector> for FusionMatrix
Source§type Output = FusionVector
type Output = FusionVector
The resulting type after applying the
*
operator.Source§impl Mul<FusionVector> for FusionQuaternion
impl Mul<FusionVector> for FusionQuaternion
Source§type Output = FusionQuaternion
type Output = FusionQuaternion
The resulting type after applying the
*
operator.Source§impl Mul<f32> for FusionVector
impl Mul<f32> for FusionVector
Source§impl Mul for FusionVector
impl Mul for FusionVector
Source§impl MulAssign for FusionVector
impl MulAssign for FusionVector
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl Sub for FusionVector
impl Sub for FusionVector
Source§impl SubAssign for FusionVector
impl SubAssign for FusionVector
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for FusionVector
Auto Trait Implementations§
impl Freeze for FusionVector
impl RefUnwindSafe for FusionVector
impl Send for FusionVector
impl Sync for FusionVector
impl Unpin for FusionVector
impl UnwindSafe for FusionVector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.