Struct slender_math::Vector3i
source · #[repr(C, align(16))]pub struct Vector3i(_);Expand description
A vector with 3 i32 components
Implementations§
source§impl Vector3i
impl Vector3i
sourcepub const fn new(x: i32, y: i32, z: i32) -> Self
pub const fn new(x: i32, y: i32, z: i32) -> Self
Creates a new vector from the given components
sourcepub const fn from_scalar(scalar: i32) -> Self
pub const fn from_scalar(scalar: i32) -> Self
Creates a new vector by setting all components to the given scalar
sourcepub const fn from_array(array: [i32; 3]) -> Self
pub const fn from_array(array: [i32; 3]) -> Self
Creates a new vector from the given array
sourcepub const fn from_v2i(v: v2i, z: i32) -> Self
pub const fn from_v2i(v: v2i, z: i32) -> Self
Creates a new vector from the given 2-component vector
sourcepub fn as_mut_array(&mut self) -> &mut [i32; 3]
pub fn as_mut_array(&mut self) -> &mut [i32; 3]
Returns a mutable array reference to the vector
source§impl Vector3i
impl Vector3i
§impl Vector3i
impl Vector3i
pub fn xx(&self) -> Vector2i
pub fn xy(&self) -> Vector2i
pub fn xz(&self) -> Vector2i
pub fn yx(&self) -> Vector2i
pub fn yy(&self) -> Vector2i
pub fn yz(&self) -> Vector2i
pub fn zx(&self) -> Vector2i
pub fn zy(&self) -> Vector2i
pub fn zz(&self) -> Vector2i
pub fn xxx(&self) -> Vector3i
pub fn xxy(&self) -> Vector3i
pub fn xxz(&self) -> Vector3i
pub fn xyx(&self) -> Vector3i
pub fn xyy(&self) -> Vector3i
pub fn xyz(&self) -> Vector3i
pub fn xzx(&self) -> Vector3i
pub fn xzy(&self) -> Vector3i
pub fn xzz(&self) -> Vector3i
pub fn yxx(&self) -> Vector3i
pub fn yxy(&self) -> Vector3i
pub fn yxz(&self) -> Vector3i
pub fn yyx(&self) -> Vector3i
pub fn yyy(&self) -> Vector3i
pub fn yyz(&self) -> Vector3i
pub fn yzx(&self) -> Vector3i
pub fn yzy(&self) -> Vector3i
pub fn yzz(&self) -> Vector3i
pub fn zxx(&self) -> Vector3i
pub fn zxy(&self) -> Vector3i
pub fn zxz(&self) -> Vector3i
pub fn zyx(&self) -> Vector3i
pub fn zyy(&self) -> Vector3i
pub fn zyz(&self) -> Vector3i
pub fn zzx(&self) -> Vector3i
pub fn zzy(&self) -> Vector3i
pub fn zzz(&self) -> Vector3i
pub fn xxxx(&self) -> Vector4i
pub fn xxxy(&self) -> Vector4i
pub fn xxxz(&self) -> Vector4i
pub fn xxyx(&self) -> Vector4i
pub fn xxyy(&self) -> Vector4i
pub fn xxyz(&self) -> Vector4i
pub fn xxzx(&self) -> Vector4i
pub fn xxzy(&self) -> Vector4i
pub fn xxzz(&self) -> Vector4i
pub fn xyxx(&self) -> Vector4i
pub fn xyxy(&self) -> Vector4i
pub fn xyxz(&self) -> Vector4i
pub fn xyyx(&self) -> Vector4i
pub fn xyyy(&self) -> Vector4i
pub fn xyyz(&self) -> Vector4i
pub fn xyzx(&self) -> Vector4i
pub fn xyzy(&self) -> Vector4i
pub fn xyzz(&self) -> Vector4i
pub fn xzxx(&self) -> Vector4i
pub fn xzxy(&self) -> Vector4i
pub fn xzxz(&self) -> Vector4i
pub fn xzyx(&self) -> Vector4i
pub fn xzyy(&self) -> Vector4i
pub fn xzyz(&self) -> Vector4i
pub fn xzzx(&self) -> Vector4i
pub fn xzzy(&self) -> Vector4i
pub fn xzzz(&self) -> Vector4i
pub fn yxxx(&self) -> Vector4i
pub fn yxxy(&self) -> Vector4i
pub fn yxxz(&self) -> Vector4i
pub fn yxyx(&self) -> Vector4i
pub fn yxyy(&self) -> Vector4i
pub fn yxyz(&self) -> Vector4i
pub fn yxzx(&self) -> Vector4i
pub fn yxzy(&self) -> Vector4i
pub fn yxzz(&self) -> Vector4i
pub fn yyxx(&self) -> Vector4i
pub fn yyxy(&self) -> Vector4i
pub fn yyxz(&self) -> Vector4i
pub fn yyyx(&self) -> Vector4i
pub fn yyyy(&self) -> Vector4i
pub fn yyyz(&self) -> Vector4i
pub fn yyzx(&self) -> Vector4i
pub fn yyzy(&self) -> Vector4i
pub fn yyzz(&self) -> Vector4i
pub fn yzxx(&self) -> Vector4i
pub fn yzxy(&self) -> Vector4i
pub fn yzxz(&self) -> Vector4i
pub fn yzyx(&self) -> Vector4i
pub fn yzyy(&self) -> Vector4i
pub fn yzyz(&self) -> Vector4i
pub fn yzzx(&self) -> Vector4i
pub fn yzzy(&self) -> Vector4i
pub fn yzzz(&self) -> Vector4i
pub fn zxxx(&self) -> Vector4i
pub fn zxxy(&self) -> Vector4i
pub fn zxxz(&self) -> Vector4i
pub fn zxyx(&self) -> Vector4i
pub fn zxyy(&self) -> Vector4i
pub fn zxyz(&self) -> Vector4i
pub fn zxzx(&self) -> Vector4i
pub fn zxzy(&self) -> Vector4i
pub fn zxzz(&self) -> Vector4i
pub fn zyxx(&self) -> Vector4i
pub fn zyxy(&self) -> Vector4i
pub fn zyxz(&self) -> Vector4i
pub fn zyyx(&self) -> Vector4i
pub fn zyyy(&self) -> Vector4i
pub fn zyyz(&self) -> Vector4i
pub fn zyzx(&self) -> Vector4i
pub fn zyzy(&self) -> Vector4i
pub fn zyzz(&self) -> Vector4i
pub fn zzxx(&self) -> Vector4i
pub fn zzxy(&self) -> Vector4i
pub fn zzxz(&self) -> Vector4i
pub fn zzyx(&self) -> Vector4i
pub fn zzyy(&self) -> Vector4i
pub fn zzyz(&self) -> Vector4i
pub fn zzzx(&self) -> Vector4i
pub fn zzzy(&self) -> Vector4i
pub fn zzzz(&self) -> Vector4i
Trait Implementations§
source§impl AddAssign<Vector3i> for Vector3i
impl AddAssign<Vector3i> for Vector3i
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl AddAssign<i32> for Vector3i
impl AddAssign<i32> for Vector3i
source§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
Performs the
+= operation. Read moresource§impl DivAssign<Vector3i> for Vector3i
impl DivAssign<Vector3i> for Vector3i
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moresource§impl DivAssign<i32> for Vector3i
impl DivAssign<i32> for Vector3i
source§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the
/= operation. Read moresource§impl MulAssign<Vector3i> for Vector3i
impl MulAssign<Vector3i> for Vector3i
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moresource§impl MulAssign<i32> for Vector3i
impl MulAssign<i32> for Vector3i
source§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the
*= operation. Read moresource§impl PartialEq<Vector3i> for Vector3i
impl PartialEq<Vector3i> for Vector3i
source§impl RemAssign<Vector3i> for Vector3i
impl RemAssign<Vector3i> for Vector3i
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moresource§impl RemAssign<i32> for Vector3i
impl RemAssign<i32> for Vector3i
source§fn rem_assign(&mut self, rhs: i32)
fn rem_assign(&mut self, rhs: i32)
Performs the
%= operation. Read moresource§impl SubAssign<Vector3i> for Vector3i
impl SubAssign<Vector3i> for Vector3i
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moresource§impl SubAssign<i32> for Vector3i
impl SubAssign<i32> for Vector3i
source§fn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
Performs the
-= operation. Read moreimpl Copy for Vector3i
impl Eq for Vector3i
impl Pod for Vector3i
Auto Trait Implementations§
impl RefUnwindSafe for Vector3i
impl Send for Vector3i
impl Sync for Vector3i
impl Unpin for Vector3i
impl UnwindSafe for Vector3i
Blanket Implementations§
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.