Struct scad_tree_math::Pt4
source · pub struct Pt4 {
pub x: f64,
pub y: f64,
pub z: f64,
pub w: f64,
}
Expand description
A 4D point.
Fields§
§x: f64
§y: f64
§z: f64
§w: f64
Implementations§
source§impl Pt4
impl Pt4
pub fn new(x: f64, y: f64, z: f64, w: f64) -> Self
pub fn dot(self, rhs: Self) -> f64
pub fn cross(self, rhs: Self) -> Self
pub fn len2(self) -> f64
pub fn len(self) -> f64
pub fn normalize(&mut self)
pub fn normalized(self) -> Self
pub fn lerp(self, b: Self, t: f64) -> Self
pub fn as_pt3(&self) -> Pt3
Trait Implementations§
source§impl AddAssign for Pt4
impl AddAssign for Pt4
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<f64> for Pt4
impl DivAssign<f64> for Pt4
source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moresource§impl MulAssign<f64> for Pt4
impl MulAssign<f64> for Pt4
source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moresource§impl SubAssign for Pt4
impl SubAssign for Pt4
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Pt4
impl StructuralPartialEq for Pt4
Auto Trait Implementations§
impl RefUnwindSafe for Pt4
impl Send for Pt4
impl Sync for Pt4
impl Unpin for Pt4
impl UnwindSafe for Pt4
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