Struct rust_tracer::math::Vector3
source · Tuple Fields§
§0: f64§1: f64§2: f64Implementations§
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<Vector3> for Vector3
impl AddAssign<Vector3> 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 PartialEq<Vector3> for Vector3
impl PartialEq<Vector3> for Vector3
source§impl SubAssign<Vector3> for Vector3
impl SubAssign<Vector3> for Vector3
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read more