#[repr(C)]pub struct Vec3 {
pub x: f32,
pub y: f32,
pub z: f32,
}Fields§
§x: f32§y: f32§z: f32Implementations§
Source§impl Vec3
impl Vec3
pub const fn new(x: f32, y: f32, z: f32) -> Self
Sourcepub fn sqr_magnitude(&self) -> f32
pub fn sqr_magnitude(&self) -> f32
Returns the square of the vector’s length.
Faster to compute than magnitude()
Sourcepub fn normalized(&self) -> Self
pub fn normalized(&self) -> Self
Returns a normalized copy of self
pub fn extend(&self, w: f32) -> Vec4
pub fn xx(&self) -> Vec2
Available on crate feature
swizzle only.pub fn xy(&self) -> Vec2
Available on crate feature
swizzle only.pub fn xz(&self) -> Vec2
Available on crate feature
swizzle only.pub fn yx(&self) -> Vec2
Available on crate feature
swizzle only.pub fn yy(&self) -> Vec2
Available on crate feature
swizzle only.pub fn yz(&self) -> Vec2
Available on crate feature
swizzle only.pub fn zx(&self) -> Vec2
Available on crate feature
swizzle only.pub fn zy(&self) -> Vec2
Available on crate feature
swizzle only.pub fn zz(&self) -> Vec2
Available on crate feature
swizzle only.pub fn xxx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xxy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xxz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xyx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xyy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xyz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xzx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xzy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xzz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yxx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yxy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yxz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yyx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yyy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yyz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yzx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yzy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn yzz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zxx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zxy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zxz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zyx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zyy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zyz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zzx(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zzy(&self) -> Vec3
Available on crate feature
swizzle only.pub fn zzz(&self) -> Vec3
Available on crate feature
swizzle only.pub fn xxxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xxzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xyzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn xzzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yxzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yyzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn yzzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zxzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zyzz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzxx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzxy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzxz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzyx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzyy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzyz(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzzx(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzzy(&self) -> Vec4
Available on crate feature
swizzle only.pub fn zzzz(&self) -> Vec4
Available on crate feature
swizzle only.Trait Implementations§
Source§impl AddAssign<&Vec3> for Vec3
impl AddAssign<&Vec3> for Vec3
Source§fn add_assign(&mut self, rhs: &Vec3)
fn add_assign(&mut self, rhs: &Vec3)
Performs the
+= operation. Read moreSource§impl AddAssign for Vec3
impl AddAssign for Vec3
Source§fn add_assign(&mut self, rhs: Vec3)
fn add_assign(&mut self, rhs: Vec3)
Performs the
+= operation. Read moreSource§impl DivAssign<&Vec3> for Vec3
impl DivAssign<&Vec3> for Vec3
Source§fn div_assign(&mut self, rhs: &Vec3)
fn div_assign(&mut self, rhs: &Vec3)
Performs the
/= operation. Read moreSource§impl DivAssign<&f32> for Vec3
impl DivAssign<&f32> for Vec3
Source§fn div_assign(&mut self, rhs: &f32)
fn div_assign(&mut self, rhs: &f32)
Performs the
/= operation. Read moreSource§impl DivAssign<f32> for Vec3
impl DivAssign<f32> for Vec3
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/= operation. Read moreSource§impl DivAssign for Vec3
impl DivAssign for Vec3
Source§fn div_assign(&mut self, rhs: Vec3)
fn div_assign(&mut self, rhs: Vec3)
Performs the
/= operation. Read moreSource§impl Mul<&Vec3> for &Quaternion
impl Mul<&Vec3> for &Quaternion
Source§impl Mul<&Vec3> for Quaternion
impl Mul<&Vec3> for Quaternion
Source§impl Mul<Vec3> for &Quaternion
impl Mul<Vec3> for &Quaternion
Source§impl Mul<Vec3> for Quaternion
impl Mul<Vec3> for Quaternion
Source§impl MulAssign<&Vec3> for Vec3
impl MulAssign<&Vec3> for Vec3
Source§fn mul_assign(&mut self, rhs: &Vec3)
fn mul_assign(&mut self, rhs: &Vec3)
Performs the
*= operation. Read moreSource§impl MulAssign<&f32> for Vec3
impl MulAssign<&f32> for Vec3
Source§fn mul_assign(&mut self, rhs: &f32)
fn mul_assign(&mut self, rhs: &f32)
Performs the
*= operation. Read moreSource§impl MulAssign<f32> for Vec3
impl MulAssign<f32> for Vec3
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreSource§impl MulAssign for Vec3
impl MulAssign for Vec3
Source§fn mul_assign(&mut self, rhs: Vec3)
fn mul_assign(&mut self, rhs: Vec3)
Performs the
*= operation. Read moreSource§impl SubAssign<&Vec3> for Vec3
impl SubAssign<&Vec3> for Vec3
Source§fn sub_assign(&mut self, rhs: &Vec3)
fn sub_assign(&mut self, rhs: &Vec3)
Performs the
-= operation. Read moreSource§impl SubAssign for Vec3
impl SubAssign for Vec3
Source§fn sub_assign(&mut self, rhs: Vec3)
fn sub_assign(&mut self, rhs: Vec3)
Performs the
-= operation. Read moreimpl 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