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: Vec3
pub const ONE: Vec3
pub const UP: Vec3
pub const FORWARD: Vec3
pub const fn new(x: f32, y: f32, z: f32) -> Self
pub fn length(&self) -> f32
pub fn normalize(&self) -> Self
pub fn dot(&self, other: Vec3) -> f32
pub fn cross(&self, other: Vec3) -> Vec3
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