#[repr(C)]pub struct Vec3 {
pub x: f32,
pub y: f32,
pub z: f32,
}Expand description
3D Vector
Fields§
§x: f32§y: f32§z: f32Implementations§
Source§impl Vec3
impl Vec3
pub const ZERO: Self
pub const ONE: Self
pub const UP: Self
pub const RIGHT: Self
pub const FORWARD: Self
pub const fn new(x: f32, y: f32, z: f32) -> Self
pub fn dot(self, other: Self) -> f32
pub fn cross(self, other: Self) -> Self
pub fn length_squared(self) -> f32
pub fn length(self) -> f32
pub fn normalize(self) -> Self
pub fn lerp(self, other: Self, t: f32) -> Self
Trait Implementations§
impl Copy for Vec3
impl StructuralPartialEq for Vec3
Auto Trait Implementations§
impl Forget for Vec3
impl Freeze for Vec3
impl Move 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