struct Point3D {
x: f64,
y: f64,
z: f64,
}Expand description
Simple 3D point structure
Fields§
§x: f64§y: f64§z: f64Implementations§
Source§impl Point3D
impl Point3D
fn new(x: f64, y: f64, z: f64) -> Self
fn sub(&self, other: &Point3D) -> Point3D
fn dot(&self, other: &Point3D) -> f64
fn cross(&self, other: &Point3D) -> Point3D
fn norm(&self) -> f64
fn normalize(&self) -> Point3D
fn scale(&self, s: f64) -> Point3D
fn add(&self, other: &Point3D) -> Point3D
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Point3D
impl RefUnwindSafe for Point3D
impl Send for Point3D
impl Sync for Point3D
impl Unpin for Point3D
impl UnsafeUnpin for Point3D
impl UnwindSafe for Point3D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more