pub struct Vec3 {
pub x: f32,
pub y: f32,
pub z: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
Implementations§
Source§impl Vec3
impl Vec3
pub const X: Vec3
pub const Y: Vec3
pub const Z: Vec3
pub fn add(self, other: Vec3) -> Vec3
pub fn scale(self, factor: f32) -> Vec3
pub fn dot(&self, other: &Self) -> f32
pub fn norm(&self) -> f32
pub fn zero() -> Self
pub fn normalize(&self) -> Self
pub fn random() -> Self
pub fn unit_x() -> Self
pub fn unit_y() -> Self
pub fn unit_z() -> 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 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