#[non_exhaustive]pub struct Vec3 {
pub x: f64,
pub y: f64,
pub z: f64,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.x: f64§y: f64§z: f64Implementations§
Source§impl Vec3
impl Vec3
pub const ZERO: Self
pub const ONE: Self
pub const X: Self
pub const Y: Self
pub const Z: Self
pub const fn new(x: f64, y: f64, z: f64) -> Self
pub fn from_vec2(v: Vec2, z: f64) -> Self
pub fn xy(self) -> Vec2
pub fn dot(self, rhs: Self) -> f64
pub fn cross(self, rhs: Self) -> Self
pub fn length_sq(self) -> f64
pub fn length(self) -> f64
pub fn normalize(self) -> Self
pub fn lerp(self, other: Self, t: f64) -> 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