pub struct Point3 {
pub x: f64,
pub y: f64,
pub z: f64,
}Expand description
3D point / vector.
Fields§
§x: f64§y: f64§z: f64Implementations§
Source§impl Point3
impl Point3
pub fn new(x: f64, y: f64, z: f64) -> Self
pub fn zero() -> Self
pub fn dot(self, other: Self) -> f64
pub fn cross(self, other: Self) -> Self
pub fn len_sq(self) -> f64
pub fn len(self) -> f64
pub fn normalize(self) -> Self
pub fn dist(self, other: Self) -> f64
pub fn lerp(self, other: Self, t: f64) -> Self
pub fn abs(self) -> Self
pub fn component_min(self, other: Self) -> Self
pub fn component_max(self, other: Self) -> Self
Trait Implementations§
Source§impl AddAssign for Point3
impl AddAssign for Point3
Source§fn add_assign(&mut self, o: Self)
fn add_assign(&mut self, o: Self)
Performs the
+= operation. Read moreimpl Copy for Point3
impl StructuralPartialEq for Point3
Auto Trait Implementations§
impl Freeze for Point3
impl RefUnwindSafe for Point3
impl Send for Point3
impl Sync for Point3
impl Unpin for Point3
impl UnsafeUnpin for Point3
impl UnwindSafe for Point3
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