[−][src]Struct brutils::math::Vector3
3 component vector, values are stored as doubles (f64)
Fields
x: f64
y: f64
z: f64
Methods
impl Vector3
[src]
pub fn new(x: f64, y: f64, z: f64) -> Self
[src]
pub fn set(&mut self, x: f64, y: f64, z: f64)
[src]
pub fn set_from_spherical(&mut self, azimuthal_angle: f64, polar_angle: f64)
[src]
pub fn set_random_direction(&mut self)
[src]
pub fn length(&self) -> f64
[src]
pub fn length_squared(&self) -> f64
[src]
pub fn distance(&self, other: &Vector3) -> f64
[src]
pub fn distance_squared(&self, other: &Vector3) -> f64
[src]
pub fn dot(&self, other: &Vector3) -> f64
[src]
pub fn cross(&self, other: &Vector3) -> Vector3
[src]
pub fn lerp(&mut self, target: &Vector3, alpha: f64)
[src]
pub fn nor(&mut self)
[src]
pub fn slerp(&mut self, target: &Vector3, alpha: f64)
[src]
pub fn copy(&self) -> Self
[src]
pub fn add(&mut self, other: &Vector3)
[src]
pub fn subtract(&mut self, other: &Vector3)
[src]
pub fn multiply(&mut self, other: &Vector3)
[src]
pub fn divide(&mut self, other: &Vector3)
[src]
pub fn add_scalar(&mut self, other: f64)
[src]
pub fn subtract_scalar(&mut self, other: f64)
[src]
pub fn multiply_scalar(&mut self, other: f64)
[src]
pub fn divide_scalar(&mut self, other: f64)
[src]
pub fn equals(&self, other: &Vector3) -> bool
[src]
Trait Implementations
impl Default for Vector3
[src]
impl Clone for Vector3
[src]
fn clone(&self) -> Vector3
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Vector3
[src]
impl Debug for Vector3
[src]
impl Display for Vector3
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,