pub struct Vector3(pub f64, pub f64, pub f64);
Tuple Fields§
§0: f64
§1: f64
§2: f64
Implementations§
Source§impl Vector3
impl Vector3
pub fn new(x: f64, y: f64, z: f64) -> Vector3
pub fn x(&self) -> f64
pub fn y(&self) -> f64
pub fn z(&self) -> f64
pub fn length_squared(&self) -> f64
pub fn length(&self) -> f64
pub fn dot(&self, other: &Self) -> f64
pub fn cross(&self, other: &Self) -> Self
pub fn unit_vector(&self) -> Self
pub fn near_zero(&self) -> bool
Trait Implementations§
Source§impl AddAssign for Vector3
impl AddAssign for Vector3
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign<f64> for Vector3
impl DivAssign<f64> for Vector3
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moreSource§impl MulAssign<f64> for Vector3
impl MulAssign<f64> for Vector3
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreSource§impl SubAssign for Vector3
impl SubAssign for Vector3
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Vector3
impl StructuralPartialEq for Vector3
Auto Trait Implementations§
impl Freeze for Vector3
impl RefUnwindSafe for Vector3
impl Send for Vector3
impl Sync for Vector3
impl Unpin for Vector3
impl UnwindSafe for Vector3
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