pub struct Vec3 {
pub x: f64,
pub y: f64,
pub z: f64,
}Expand description
Three-dimensional vector or coordinate.
Fields§
§x: f64§y: f64§z: f64Implementations§
Source§impl Vec3
impl Vec3
pub const ZERO: Self
pub const fn new(x: f64, y: f64, z: f64) -> Self
pub fn is_finite(self) -> bool
pub fn sub(self, other: Self) -> Self
pub fn cross(self, other: Self) -> Self
pub fn dot(self, other: Self) -> f64
pub fn norm(self) -> f64
pub fn normalized(self) -> Option<Self>
Trait Implementations§
impl Copy for Vec3
impl StructuralPartialEq for Vec3
Auto Trait Implementations§
impl Freeze for Vec3
impl RefUnwindSafe for Vec3
impl Send for Vec3
impl Sync for Vec3
impl Unpin for Vec3
impl UnsafeUnpin for Vec3
impl UnwindSafe for Vec3
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