| 1 | use craterust-analyzer cargo glam 0.18.0 crate/::corerust-analyzer cargo glam 0.18.0 core/::{ |
| 2 | storagerust-analyzer cargo glam 0.18.0 core/storage/::{XYrust-analyzer cargo glam 0.18.0 core/storage/XY#, XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#, XYZWrust-analyzer cargo glam 0.18.0 core/storage/XYZW#}, |
| 3 | traitsrust-analyzer cargo glam 0.18.0 core/traits/::{ |
| 4 | quaternionrust-analyzer cargo glam 0.18.0 core/traits/quaternion/::Quaternionrust-analyzer cargo glam 0.18.0 core/traits/quaternion/Quaternion#, |
| 5 | scalarrust-analyzer cargo glam 0.18.0 core/traits/scalar/::{FloatExrust-analyzer cargo glam 0.18.0 core/traits/scalar/FloatEx#, NumExrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumEx#}, |
| 6 | vectorrust-analyzer cargo glam 0.18.0 core/traits/vector/::*, |
| 7 | }, |
| 8 | }; |
| 9 | |
| 10 | pub trait MatrixConstrust-analyzer cargo glam 0.18.0 core/traits/matrix/MatrixConst# { |
| 11 | const ZEROrust-analyzer cargo glam 0.18.0 core/traits/matrix/MatrixConst#ZERO.: Self; |
| 12 | const IDENTITYrust-analyzer cargo glam 0.18.0 core/traits/matrix/MatrixConst#IDENTITY.: Self; |
| 13 | } |
| 14 | |
| 15 | /// Base matrix trait that sets up trait bounds |
| 16 | pub trait Matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix#<T: NumExrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumEx#>: Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized# + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy# + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# {} |
| 17 | |
| 18 | /// 2x2 Matrix trait for all types of T |
| 19 | pub trait Matrix2x2rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#<T: NumExrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumEx#, V2: Vector2rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#<T>>: Matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix#<T> { |
| 20 | #[inline(always)] |
| 21 | fn newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(m00: T, m01: T, m10: T, m11: T) -> Self { |
| 22 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().(V2::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#new().(m00, m01), V2::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#new().(m10, m11)) |
| 23 | } |
| 24 | |
| 25 | fn from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().(x_axis: V2, y_axis: V2) -> Self; |
| 26 | |
| 27 | fn x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(&self) -> &V2; |
| 28 | fn y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(&self) -> &V2; |
| 29 | |
| 30 | #[inline(always)] |
| 31 | fn from_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols_array().(m: &[T; 4]) -> Self { |
| 32 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().) |
| 33 | } |
| 34 | |
| 35 | #[rustfmt::skip] |
| 36 | #[inline(always)] |
| 37 | fn to_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#to_cols_array().(&self) -> [T; 4] { |
| 38 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 39 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 40 | [x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(), x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().(), |
| 41 | y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(), y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().()] |
| 42 | } |
| 43 | |
| 44 | #[inline(always)] |
| 45 | fn from_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols_array_2d().(m: &[[T; 2]; 2]) -> Self { |
| 46 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().(V2::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), V2::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)) |
| 47 | } |
| 48 | |
| 49 | #[inline(always)] |
| 50 | fn to_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#to_cols_array_2d().(&self) -> [[T; 2]; 2] { |
| 51 | [self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#into_array().(), self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#into_array().()] |
| 52 | } |
| 53 | |
| 54 | #[inline(always)] |
| 55 | fn from_cols_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols_slice().(m: &[T]) -> Self { |
| 56 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().) |
| 57 | } |
| 58 | |
| 59 | #[inline(always)] |
| 60 | fn write_cols_to_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#write_cols_to_slice().(&self, slice: &mut [T]) { |
| 61 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 62 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 63 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(); |
| 64 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().(); |
| 65 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(); |
| 66 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().(); |
| 67 | } |
| 68 | |
| 69 | #[rustfmt::skip] |
| 70 | #[inline(always)] |
| 71 | fn from_diagonalrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_diagonal().(diagonal: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> Self { |
| 72 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().( |
| 73 | diagonal.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., |
| 74 | T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y.) |
| 75 | } |
| 76 | |
| 77 | #[inline] |
| 78 | fn determinantrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#determinant().(&self) -> T { |
| 79 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 80 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 81 | x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() |
| 82 | } |
| 83 | |
| 84 | #[inline(always)] |
| 85 | fn transposerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#transpose().(&self) -> Self { |
| 86 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 87 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 88 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(), y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().(), x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().(), y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().()) |
| 89 | } |
| 90 | |
| 91 | #[inline] |
| 92 | fn mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#mul_vector().(&self, other: V2) -> V2 { |
| 93 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 94 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 95 | #[allow(clippy::suspicious_operation_groupings)] |
| 96 | V2::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#new().( |
| 97 | (x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().(y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().()), |
| 98 | (x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().(y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().other.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().()), |
| 99 | ) |
| 100 | } |
| 101 | |
| 102 | #[inline] |
| 103 | fn mul_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#mul_matrix().(&self, other: &Self) -> Self { |
| 104 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().( |
| 105 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().()), |
| 106 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().()), |
| 107 | ) |
| 108 | } |
| 109 | |
| 110 | #[inline] |
| 111 | fn mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#mul_scalar().(&self, other: T) -> Self { |
| 112 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().( |
| 113 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 114 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 115 | ) |
| 116 | } |
| 117 | |
| 118 | #[inline] |
| 119 | fn add_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#add_matrix().(&self, other: &Self) -> Self { |
| 120 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().( |
| 121 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().()), |
| 122 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().()), |
| 123 | ) |
| 124 | } |
| 125 | |
| 126 | #[inline] |
| 127 | fn sub_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#sub_matrix().(&self, other: &Self) -> Self { |
| 128 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#from_cols().( |
| 129 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().()), |
| 130 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().()), |
| 131 | ) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | /// 2x2 matrix trait for float types of T |
| 136 | pub trait FloatMatrix2x2rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix2x2#<T: FloatExrust-analyzer cargo glam 0.18.0 core/traits/scalar/FloatEx#, V2: FloatVector2rust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector2#<T>>: Matrix2x2rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#<T, V2> { |
| 137 | #[inline] |
| 138 | fn abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix2x2#abs_diff_eq().(&self, other: &Self, max_abs_diff: T) -> bool |
| 139 | where |
| 140 | <V2 as Vectorrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#<T>>::Maskrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#Mask#: MaskVector2rust-analyzer cargo glam 0.18.0 core/traits/vector/MaskVector2#, |
| 141 | { |
| 142 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector2#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(), max_abs_diff) |
| 143 | && self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector2#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(), max_abs_diff) |
| 144 | } |
| 145 | |
| 146 | #[inline] |
| 147 | fn from_scale_anglerust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix2x2#from_scale_angle().(scale: V2, angle: T) -> Self { |
| 148 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 149 | let (scale_x, scale_y) = scale.into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#into_tuple().(); |
| 150 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(cos rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale_x, sin rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale_x, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sin rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale_y, cos rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale_y) |
| 151 | } |
| 152 | |
| 153 | #[inline] |
| 154 | fn from_anglerust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix2x2#from_angle().(angle: T) -> Self { |
| 155 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 156 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().(cos, sin, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sin, cos) |
| 157 | } |
| 158 | |
| 159 | #[inline] |
| 160 | fn inverserust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix2x2#inverse().(&self) -> Self { |
| 161 | let inv_det = { |
| 162 | let det = self.determinantrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#determinant().(); |
| 163 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(det != T::ZERO); |
| 164 | det.reciprust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#recip().() |
| 165 | }; |
| 166 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#x_axis().(); |
| 167 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#y_axis().(); |
| 168 | Self::newrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix2x2#new().( |
| 169 | y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().inv_det, |
| 170 | x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().inv_det, |
| 171 | y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().inv_det, |
| 172 | x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector2#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().inv_det, |
| 173 | ) |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | pub trait Matrix3x3rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#<T: NumExrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumEx#, V3: Vector3rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#<T>>: Matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix#<T> { |
| 178 | fn from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().(x_axis: V3, y_axis: V3, z_axis: V3) -> Self; |
| 179 | |
| 180 | fn x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(&self) -> &V3; |
| 181 | fn y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(&self) -> &V3; |
| 182 | fn z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(&self) -> &V3; |
| 183 | |
| 184 | #[rustfmt::skip] |
| 185 | #[inline(always)] |
| 186 | fn from_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols_array().(m: &[T; 9]) -> Self { |
| 187 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 188 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 189 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 190 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)) |
| 191 | } |
| 192 | |
| 193 | #[rustfmt::skip] |
| 194 | #[inline(always)] |
| 195 | fn to_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#to_cols_array().(&self) -> [T; 9] { |
| 196 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(); |
| 197 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(); |
| 198 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(); |
| 199 | [ |
| 200 | x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(), x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(), x_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(), |
| 201 | y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(), y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(), y_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(), |
| 202 | z_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(), z_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(), z_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(), |
| 203 | ] |
| 204 | } |
| 205 | |
| 206 | #[inline(always)] |
| 207 | fn from_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols_array_2d().(m: &[[T; 3]; 3]) -> Self { |
| 208 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 209 | V3::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 210 | V3::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 211 | V3::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 212 | ) |
| 213 | } |
| 214 | |
| 215 | #[inline(always)] |
| 216 | fn to_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#to_cols_array_2d().(&self) -> [[T; 3]; 3] { |
| 217 | [ |
| 218 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_array().(), |
| 219 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_array().(), |
| 220 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_array().(), |
| 221 | ] |
| 222 | } |
| 223 | |
| 224 | #[inline(always)] |
| 225 | fn from_cols_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols_slice().(m: &[T]) -> Self { |
| 226 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 227 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 228 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 229 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 230 | ) |
| 231 | } |
| 232 | |
| 233 | #[inline(always)] |
| 234 | fn write_cols_to_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#write_cols_to_slice().(&self, slice: &mut [T]) { |
| 235 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(); |
| 236 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(); |
| 237 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(); |
| 238 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(); |
| 239 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(); |
| 240 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(); |
| 241 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(); |
| 242 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(); |
| 243 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(); |
| 244 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(); |
| 245 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(); |
| 246 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(); |
| 247 | } |
| 248 | |
| 249 | #[rustfmt::skip] |
| 250 | #[inline(always)] |
| 251 | fn from_diagonalrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_diagonal().(diagonal: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 252 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 253 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(diagonal.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 254 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 255 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.), |
| 256 | ) |
| 257 | } |
| 258 | |
| 259 | #[inline(always)] |
| 260 | fn from_scalerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_scale().(scale: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> Self { |
| 261 | // Do not panic as long as any component is non-zero |
| 262 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(scale.cmpne(XY::<T>::ZERO).any()); |
| 263 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 264 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(scale.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 265 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., scale.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 266 | V3::Zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#Z., |
| 267 | ) |
| 268 | } |
| 269 | |
| 270 | #[inline(always)] |
| 271 | fn from_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_translation().(translation: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> Self { |
| 272 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().(V3::Xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#X., V3::Yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#Y., V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(translation.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., translation.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.)) |
| 273 | } |
| 274 | |
| 275 | #[inline] |
| 276 | fn determinantrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#determinant().(&self) -> T { |
| 277 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().dotrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#dot().(self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().())) |
| 278 | } |
| 279 | |
| 280 | #[inline] |
| 281 | fn transposerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#transpose().(&self) -> Self { |
| 282 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(); |
| 283 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(); |
| 284 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(); |
| 285 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 286 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(), y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().(), z_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#x().()), |
| 287 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(), y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().(), z_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#y().()), |
| 288 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(x_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(), y_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().(), z_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#z().()), |
| 289 | ) |
| 290 | } |
| 291 | |
| 292 | #[inline] |
| 293 | fn mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_vector().(&self, other: V3) -> V3 { |
| 294 | let mut res = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(other.splat_xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#splat_x().()); |
| 295 | res = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().mul_addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_add().(other.splat_yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#splat_y().(), res); |
| 296 | res = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().mul_addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_add().(other.splat_zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#splat_z().(), res); |
| 297 | res |
| 298 | } |
| 299 | |
| 300 | #[inline] |
| 301 | fn mul_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_matrix().(&self, other: &Self) -> Self { |
| 302 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 303 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().()), |
| 304 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().()), |
| 305 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().()), |
| 306 | ) |
| 307 | } |
| 308 | |
| 309 | #[inline] |
| 310 | fn mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#mul_scalar().(&self, other: T) -> Self { |
| 311 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 312 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 313 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 314 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 315 | ) |
| 316 | } |
| 317 | |
| 318 | #[inline] |
| 319 | fn add_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#add_matrix().(&self, other: &Self) -> Self { |
| 320 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 321 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().()), |
| 322 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().()), |
| 323 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().()), |
| 324 | ) |
| 325 | } |
| 326 | |
| 327 | #[inline] |
| 328 | fn sub_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#sub_matrix().(&self, other: &Self) -> Self { |
| 329 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 330 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().()), |
| 331 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().()), |
| 332 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().()), |
| 333 | ) |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | pub trait FloatMatrix3x3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#<T: FloatExrust-analyzer cargo glam 0.18.0 core/traits/scalar/FloatEx#, V3: FloatVector3rust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#<T>>: Matrix3x3rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#<T, V3> { |
| 338 | #[inline] |
| 339 | fn abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#abs_diff_eq().(&self, other: &Self, max_abs_diff: T) -> bool |
| 340 | where |
| 341 | <V3 as Vectorrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#<T>>::Maskrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#Mask#: MaskVector3rust-analyzer cargo glam 0.18.0 core/traits/vector/MaskVector3#, |
| 342 | { |
| 343 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(), max_abs_diff) |
| 344 | && self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(), max_abs_diff) |
| 345 | && self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(), max_abs_diff) |
| 346 | } |
| 347 | |
| 348 | #[inline] |
| 349 | fn from_anglerust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_angle().(angle: T) -> Self { |
| 350 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 351 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 352 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(cos, sin, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 353 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sin, cos, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 354 | V3::Zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#Z., |
| 355 | ) |
| 356 | } |
| 357 | #[inline] |
| 358 | fn from_scale_angle_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_scale_angle_translation().(scale: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>, angle: T, translation: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> Self { |
| 359 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 360 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 361 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(cos rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., sin rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 362 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sin rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y., cos rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().scale.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 363 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(translation.xrust-analyzer cargo glam 0.18.0 core/storage/XY#x., translation.yrust-analyzer cargo glam 0.18.0 core/storage/XY#y., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.), |
| 364 | ) |
| 365 | } |
| 366 | |
| 367 | #[inline] |
| 368 | fn from_axis_anglerust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_axis_angle().(axis: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, angle: T) -> Self { |
| 369 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(axis.is_normalized()); |
| 370 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 371 | let (xsin, ysin, zsin) = axis.mul_scalarrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]mul_scalar().(sin).into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_tuple().(); |
| 372 | let (x, y, z) = axis.into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_tuple().(); |
| 373 | let (x2, y2, z2) = axis.mulrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]mul().(axis).into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#into_tuple().(); |
| 374 | let omc = T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().cos; |
| 375 | let xyomc = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 376 | let xzomc = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 377 | let yzomc = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 378 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 379 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(x2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos, xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().zsin, xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().ysin), |
| 380 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().zsin, y2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos, yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().xsin), |
| 381 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().ysin, yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().xsin, z2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos), |
| 382 | ) |
| 383 | } |
| 384 | |
| 385 | #[inline] |
| 386 | fn from_quaternionrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_quaternion().(rotation: XYZWrust-analyzer cargo glam 0.18.0 core/storage/XYZW#<T>) -> Self { |
| 387 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(rotation.is_normalized()); |
| 388 | let x2 = rotation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().rotation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x.; |
| 389 | let y2 = rotation.yrust-analyzer cargo glam 0.18.0 core/storage/XYZW#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().rotation.yrust-analyzer cargo glam 0.18.0 core/storage/XYZW#y.; |
| 390 | let z2 = rotation.zrust-analyzer cargo glam 0.18.0 core/storage/XYZW#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().rotation.zrust-analyzer cargo glam 0.18.0 core/storage/XYZW#z.; |
| 391 | let xx = rotation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().x2; |
| 392 | let xy = rotation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 393 | let xz = rotation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 394 | let yy = rotation.yrust-analyzer cargo glam 0.18.0 core/storage/XYZW#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 395 | let yz = rotation.yrust-analyzer cargo glam 0.18.0 core/storage/XYZW#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 396 | let zz = rotation.zrust-analyzer cargo glam 0.18.0 core/storage/XYZW#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 397 | let wx = rotation.wrust-analyzer cargo glam 0.18.0 core/storage/XYZW#w. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().x2; |
| 398 | let wy = rotation.wrust-analyzer cargo glam 0.18.0 core/storage/XYZW#w. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 399 | let wz = rotation.wrust-analyzer cargo glam 0.18.0 core/storage/XYZW#w. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 400 | |
| 401 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 402 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(yy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().zz), xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wz, xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wy), |
| 403 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wz, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().zz), yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wx), |
| 404 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wy, yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wx, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().yy)), |
| 405 | ) |
| 406 | } |
| 407 | |
| 408 | #[inline] |
| 409 | fn from_rotation_xrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_rotation_x().(angle: T) -> Self { |
| 410 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 411 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 412 | V3::Xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#X., |
| 413 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., cosa, sina), |
| 414 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina, cosa), |
| 415 | ) |
| 416 | } |
| 417 | |
| 418 | #[inline] |
| 419 | fn from_rotation_yrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_rotation_y().(angle: T) -> Self { |
| 420 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 421 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 422 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina), |
| 423 | V3::Yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#Y., |
| 424 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., cosa), |
| 425 | ) |
| 426 | } |
| 427 | |
| 428 | #[inline] |
| 429 | fn from_rotation_zrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#from_rotation_z().(angle: T) -> Self { |
| 430 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 431 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().( |
| 432 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(cosa, sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 433 | V3::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina, cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 434 | V3::Zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3Const#Z., |
| 435 | ) |
| 436 | } |
| 437 | |
| 438 | fn transform_point2rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#transform_point2().(&self, other: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>; |
| 439 | fn transform_vector2rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#transform_vector2().(&self, other: XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>) -> XYrust-analyzer cargo glam 0.18.0 core/storage/XY#<T>; |
| 440 | |
| 441 | #[inline] |
| 442 | fn inverserust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#inverse().(&self) -> Self |
| 443 | where |
| 444 | <V3 as Vectorrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#<T>>::Maskrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#Mask#: MaskVector3rust-analyzer cargo glam 0.18.0 core/traits/vector/MaskVector3#, |
| 445 | { |
| 446 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().(); |
| 447 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().(); |
| 448 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().(); |
| 449 | let tmp0 = y_axis.crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().z_axis); |
| 450 | let tmp1 = z_axis.crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().x_axis); |
| 451 | let tmp2 = x_axis.crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().y_axis); |
| 452 | let det = z_axis.dot_into_vecrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#dot_into_vec().(tmp2); |
| 453 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(det.cmpne(V3::ZERO).all()); |
| 454 | let inv_det = det.reciprust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#recip().(); |
| 455 | // TODO: Work out if it's possible to get rid of the transpose |
| 456 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#from_cols().(tmp0.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(inv_det), tmp1.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(inv_det), tmp2.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(inv_det)).transposerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#transpose().() |
| 457 | } |
| 458 | |
| 459 | #[inline] |
| 460 | fn is_finiterust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#is_finite().(&self) -> bool { |
| 461 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().is_finiterust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_finite().() && self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().is_finiterust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_finite().() && self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().is_finiterust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_finite().() |
| 462 | } |
| 463 | |
| 464 | #[inline] |
| 465 | fn is_nanrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix3x3#is_nan().(&self) -> bool { |
| 466 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#x_axis().().is_nanrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_nan().() || self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#y_axis().().is_nanrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_nan().() || self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix3x3#z_axis().().is_nanrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#is_nan().() |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | pub trait Matrix4x4rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#<T: NumExrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumEx#, V4: Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#<T>>: Matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix#<T> { |
| 471 | fn from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().(x_axis: V4, y_axis: V4, z_axis: V4, w_axis: V4) -> Self; |
| 472 | |
| 473 | fn x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().(&self) -> &V4; |
| 474 | fn y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().(&self) -> &V4; |
| 475 | fn z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().(&self) -> &V4; |
| 476 | fn w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().(&self) -> &V4; |
| 477 | |
| 478 | #[rustfmt::skip] |
| 479 | #[inline(always)] |
| 480 | fn from_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols_array().(m: &[T; 16]) -> Self { |
| 481 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 482 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 483 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 484 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().9]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().11]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 485 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().13]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().14]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().15]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)) |
| 486 | } |
| 487 | |
| 488 | #[rustfmt::skip] |
| 489 | #[inline(always)] |
| 490 | fn to_cols_arrayrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#to_cols_array().(&self) -> [T; 16] { |
| 491 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().(); |
| 492 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().(); |
| 493 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().(); |
| 494 | let w_axis = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().(); |
| 495 | [ |
| 496 | x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(), x_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(), x_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(), |
| 497 | y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(), y_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(), y_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(), |
| 498 | z_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), z_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(), z_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(), z_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(), |
| 499 | w_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), w_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(), w_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(), w_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(), |
| 500 | ] |
| 501 | } |
| 502 | |
| 503 | #[inline(always)] |
| 504 | fn from_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols_array_2d().(m: &[[T; 4]; 4]) -> Self { |
| 505 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 506 | Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 507 | Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 508 | Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 509 | Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::from_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_array().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 510 | ) |
| 511 | } |
| 512 | |
| 513 | #[inline(always)] |
| 514 | fn to_cols_array_2drust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#to_cols_array_2d().(&self) -> [[T; 4]; 4] { |
| 515 | [ |
| 516 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_array().(), |
| 517 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_array().(), |
| 518 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_array().(), |
| 519 | self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().into_arrayrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_array().(), |
| 520 | ] |
| 521 | } |
| 522 | |
| 523 | #[rustfmt::skip] |
| 524 | #[inline(always)] |
| 525 | fn from_cols_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols_slice().(m: &[T]) -> Self { |
| 526 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 527 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 528 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 529 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().9]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().11]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().), |
| 530 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().13]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().14]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().15]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)) |
| 531 | } |
| 532 | |
| 533 | #[inline(always)] |
| 534 | fn write_cols_to_slicerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#write_cols_to_slice().(&self, slice: &mut [T]) { |
| 535 | let x_axis = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().(); |
| 536 | let y_axis = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().(); |
| 537 | let z_axis = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().(); |
| 538 | let w_axis = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().(); |
| 539 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(); |
| 540 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(); |
| 541 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(); |
| 542 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = x_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(); |
| 543 | |
| 544 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(); |
| 545 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(); |
| 546 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(); |
| 547 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = y_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(); |
| 548 | |
| 549 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(); |
| 550 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().9]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(); |
| 551 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(); |
| 552 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().11]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = z_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(); |
| 553 | |
| 554 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = w_axis.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(); |
| 555 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().13]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = w_axis.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().(); |
| 556 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().14]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = w_axis.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().(); |
| 557 | slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().15]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = w_axis.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(); |
| 558 | } |
| 559 | |
| 560 | #[inline(always)] |
| 561 | fn from_diagonalrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_diagonal().(diagonal: XYZWrust-analyzer cargo glam 0.18.0 core/storage/XYZW#<T>) -> Self { |
| 562 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 563 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(diagonal.xrust-analyzer cargo glam 0.18.0 core/storage/XYZW#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 564 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.yrust-analyzer cargo glam 0.18.0 core/storage/XYZW#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 565 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.zrust-analyzer cargo glam 0.18.0 core/storage/XYZW#z., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 566 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., diagonal.wrust-analyzer cargo glam 0.18.0 core/storage/XYZW#w.), |
| 567 | ) |
| 568 | } |
| 569 | |
| 570 | #[inline(always)] |
| 571 | fn from_scalerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_scale().(scale: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 572 | // Do not panic as long as any component is non-zero |
| 573 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(scale.cmpne(XYZ::<T>::ZERO).any()); |
| 574 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 575 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(scale.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 576 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., scale.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 577 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., scale.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 578 | V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W., |
| 579 | ) |
| 580 | } |
| 581 | |
| 582 | #[inline(always)] |
| 583 | fn from_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_translation().(translation: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 584 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 585 | V4::Xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#X., |
| 586 | V4::Yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#Y., |
| 587 | V4::Zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#Z., |
| 588 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(translation.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., translation.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., translation.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.), |
| 589 | ) |
| 590 | } |
| 591 | |
| 592 | #[inline] |
| 593 | fn determinantrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#determinant().(&self) -> T { |
| 594 | let (m00, m01, m02, m03) = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 595 | let (m10, m11, m12, m13) = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 596 | let (m20, m21, m22, m23) = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 597 | let (m30, m31, m32, m33) = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 598 | |
| 599 | let a2323 = m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32; |
| 600 | let a1323 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m31; |
| 601 | let a1223 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m31; |
| 602 | let a0323 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m30; |
| 603 | let a0223 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m30; |
| 604 | let a0123 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m30; |
| 605 | |
| 606 | m00 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a2323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a1323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a1223) |
| 607 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m01 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a2323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0223) |
| 608 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().m02 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a1323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0123) |
| 609 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m03 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a1223 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0223 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().a0123) |
| 610 | } |
| 611 | |
| 612 | #[inline] |
| 613 | fn transposerust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#transpose().(&self) -> Self { |
| 614 | let (m00, m01, m02, m03) = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 615 | let (m10, m11, m12, m13) = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 616 | let (m20, m21, m22, m23) = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 617 | let (m30, m31, m32, m33) = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 618 | |
| 619 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 620 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m00, m10, m20, m30), |
| 621 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m01, m11, m21, m31), |
| 622 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m02, m12, m22, m32), |
| 623 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m03, m13, m23, m33), |
| 624 | ) |
| 625 | } |
| 626 | |
| 627 | #[inline] |
| 628 | fn mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_vector().(&self, other: V4) -> V4 { |
| 629 | let mut res = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(other.splat_xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#splat_x().()); |
| 630 | res = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_add().(other.splat_yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#splat_y().(), res); |
| 631 | res = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_add().(other.splat_zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#splat_z().(), res); |
| 632 | res = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().mul_addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_add().(other.splat_wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#splat_w().(), res); |
| 633 | res |
| 634 | } |
| 635 | |
| 636 | #[inline] |
| 637 | fn mul_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_matrix().(&self, other: &Self) -> Self { |
| 638 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 639 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().()), |
| 640 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().()), |
| 641 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().()), |
| 642 | self.mul_vectorrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_vector().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().()), |
| 643 | ) |
| 644 | } |
| 645 | |
| 646 | #[inline] |
| 647 | fn mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_scalar().(&self, other: T) -> Self { |
| 648 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 649 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 650 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 651 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 652 | self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other), |
| 653 | ) |
| 654 | } |
| 655 | |
| 656 | #[inline] |
| 657 | fn add_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#add_matrix().(&self, other: &Self) -> Self { |
| 658 | // TODO: Make Vector4::add take a ref? |
| 659 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 660 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().()), |
| 661 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().()), |
| 662 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().()), |
| 663 | self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().()), |
| 664 | ) |
| 665 | } |
| 666 | |
| 667 | #[inline] |
| 668 | fn sub_matrixrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#sub_matrix().(&self, other: &Self) -> Self { |
| 669 | // TODO: Make Vector4::sub take a ref? |
| 670 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 671 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().()), |
| 672 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().()), |
| 673 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().()), |
| 674 | self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().()), |
| 675 | ) |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | pub trait FloatMatrix4x4rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#<T: FloatExrust-analyzer cargo glam 0.18.0 core/traits/scalar/FloatEx#, V4: FloatVector4rust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#<T> + Quaternionrust-analyzer cargo glam 0.18.0 core/traits/quaternion/Quaternion#<T>>: |
| 680 | Matrix4x4rust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#<T, V4> |
| 681 | { |
| 682 | // Vector3 represented by a SIMD type if available |
| 683 | type SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#; |
| 684 | |
| 685 | #[inline] |
| 686 | fn abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#abs_diff_eq().(&self, other: &Self, max_abs_diff: T) -> bool |
| 687 | where |
| 688 | <V4 as Vectorrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#<T>>::Maskrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#Mask#: MaskVector4rust-analyzer cargo glam 0.18.0 core/traits/vector/MaskVector4#, |
| 689 | { |
| 690 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().(), max_abs_diff) |
| 691 | && self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().(), max_abs_diff) |
| 692 | && self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().(), max_abs_diff) |
| 693 | && self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().abs_diff_eqrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#abs_diff_eq().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().(), max_abs_diff) |
| 694 | } |
| 695 | |
| 696 | #[inline] |
| 697 | fn quaternion_to_axesrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#quaternion_to_axes().(rotation: V4) -> (V4, V4, V4) { |
| 698 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(rotation.is_normalized()); |
| 699 | let (x, y, z, w) = rotation.into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 700 | let x2 = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().x; |
| 701 | let y2 = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().y; |
| 702 | let z2 = z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().z; |
| 703 | let xx = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().x2; |
| 704 | let xy = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 705 | let xz = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 706 | let yy = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 707 | let yz = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 708 | let zz = z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 709 | let wx = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().x2; |
| 710 | let wy = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().y2; |
| 711 | let wz = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().z2; |
| 712 | |
| 713 | let x_axis = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(yy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().zz), xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wz, xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wy, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.); |
| 714 | let y_axis = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wz, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().zz), yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wx, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.); |
| 715 | let z_axis = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().wy, yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().wx, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().yy), T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.); |
| 716 | (x_axis, y_axis, z_axis) |
| 717 | } |
| 718 | |
| 719 | #[inline] |
| 720 | fn from_quaternionrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_quaternion().(rotation: V4) -> Self { |
| 721 | let (x_axis, y_axis, z_axis) = Self::quaternion_to_axesrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#quaternion_to_axes().(rotation); |
| 722 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().(x_axis, y_axis, z_axis, V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W.) |
| 723 | } |
| 724 | |
| 725 | fn to_scale_quaternion_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#to_scale_quaternion_translation().(&self) -> (XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, V4, XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) { |
| 726 | let det = self.determinantrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#determinant().(); |
| 727 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(det != T::ZERO); |
| 728 | |
| 729 | let scale: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T> = Vector3rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#::newrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector3<T>`]new().( |
| 730 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().lengthrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#length().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().det.signumrust-analyzer cargo glam 0.18.0 core/traits/scalar/Signed#signum().(), |
| 731 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().lengthrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#length().(), |
| 732 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().lengthrust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#length().(), |
| 733 | ); |
| 734 | |
| 735 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(scale.cmpne(XYZ::<T>::ZERO).all()); |
| 736 | |
| 737 | let inv_scale = scale.reciprust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#recip().(); |
| 738 | |
| 739 | let rotation = Quaternionrust-analyzer cargo glam 0.18.0 core/traits/quaternion/Quaternion#::from_rotation_axesrust-analyzer cargo glam 0.18.0 core/traits/quaternion/Quaternion#from_rotation_axes().( |
| 740 | self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(inv_scale.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x.).into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().(), |
| 741 | self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(inv_scale.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y.).into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().(), |
| 742 | self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(inv_scale.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.).into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().(), |
| 743 | ); |
| 744 | |
| 745 | let translation = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().(); |
| 746 | |
| 747 | (scale, rotation, translation) |
| 748 | } |
| 749 | |
| 750 | #[inline] |
| 751 | fn from_scale_quaternion_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_scale_quaternion_translation().(scale: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, rotation: V4, translation: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 752 | let (x_axis, y_axis, z_axis) = Self::quaternion_to_axesrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#quaternion_to_axes().(rotation); |
| 753 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 754 | x_axis.mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(scale.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x.), |
| 755 | y_axis.mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(scale.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y.), |
| 756 | z_axis.mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(scale.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.), |
| 757 | V4::from_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_xyz().(translation, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.), |
| 758 | ) |
| 759 | } |
| 760 | |
| 761 | #[inline] |
| 762 | fn from_quaternion_translationrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_quaternion_translation().(rotation: V4, translation: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 763 | let (x_axis, y_axis, z_axis) = Self::quaternion_to_axesrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#quaternion_to_axes().(rotation); |
| 764 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().(x_axis, y_axis, z_axis, V4::from_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#from_xyz().(translation, T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.)) |
| 765 | } |
| 766 | |
| 767 | #[inline] |
| 768 | fn from_axis_anglerust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_axis_angle().(axis: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, angle: T) -> Self { |
| 769 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(axis.is_normalized()); |
| 770 | let (sin, cos) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 771 | let axis_sin = axis.mul_scalarrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]mul_scalar().(sin); |
| 772 | let axis_sq = axis.mulrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]mul().(axis); |
| 773 | let omc = T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().cos; |
| 774 | let xyomc = axis.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().axis.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 775 | let xzomc = axis.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().axis.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 776 | let yzomc = axis.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().axis.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc; |
| 777 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 778 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( |
| 779 | axis_sq.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos, |
| 780 | xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().axis_sin.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., |
| 781 | xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().axis_sin.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., |
| 782 | T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., |
| 783 | ), |
| 784 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( |
| 785 | xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().axis_sin.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., |
| 786 | axis_sq.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos, |
| 787 | yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().axis_sin.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., |
| 788 | T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., |
| 789 | ), |
| 790 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( |
| 791 | xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().axis_sin.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., |
| 792 | yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().axis_sin.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., |
| 793 | axis_sq.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().cos, |
| 794 | T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., |
| 795 | ), |
| 796 | V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W., |
| 797 | ) |
| 798 | } |
| 799 | |
| 800 | #[inline] |
| 801 | fn from_rotation_xrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_rotation_x().(angle: T) -> Self { |
| 802 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 803 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 804 | V4::Xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#X., |
| 805 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., cosa, sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 806 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina, cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 807 | V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W., |
| 808 | ) |
| 809 | } |
| 810 | |
| 811 | #[inline] |
| 812 | fn from_rotation_yrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_rotation_y().(angle: T) -> Self { |
| 813 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 814 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 815 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 816 | V4::Yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#Y., |
| 817 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 818 | V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W., |
| 819 | ) |
| 820 | } |
| 821 | |
| 822 | #[inline] |
| 823 | fn from_rotation_zrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#from_rotation_z().(angle: T) -> Self { |
| 824 | let (sina, cosa) = angle.sin_cosrust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#sin_cos().(); |
| 825 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 826 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(cosa, sina, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 827 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().sina, cosa, T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 828 | V4::Zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#Z., |
| 829 | V4::Wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4Const#W., |
| 830 | ) |
| 831 | } |
| 832 | |
| 833 | #[inline] |
| 834 | fn look_to_lhrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#look_to_lh().(eye: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, dir: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, up: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 835 | let f = dir.normalizerust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#normalize().(); |
| 836 | let s = up.crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(f).normalizerust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector3#normalize().(); |
| 837 | let u = f.crossrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#cross().(s); |
| 838 | Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 839 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(s.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., u.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., f.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 840 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(s.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., u.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., f.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 841 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(s.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., u.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., f.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z., T::ZEROrust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ZERO.), |
| 842 | V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().s.dotrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#dot().(eye), -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().u.dotrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#dot().(eye), -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().f.dotrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector3#dot().(eye), T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.), |
| 843 | ) |
| 844 | } |
| 845 | |
| 846 | #[inline] |
| 847 | fn look_at_lhrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#look_at_lh().(eye: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, center: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, up: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 848 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(up.is_normalized()); |
| 849 | Self::look_to_lhrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#look_to_lh().(eye, center.subrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]sub().(eye), up) |
| 850 | } |
| 851 | |
| 852 | #[inline] |
| 853 | fn look_at_rhrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#look_at_rh().(eye: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, center: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>, up: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> Self { |
| 854 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(up.is_normalized()); |
| 855 | Self::look_to_lhrust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#look_to_lh().(eye, eye.subrust-analyzer cargo glam 0.18.0 core/scalar/vector/impl#[`XYZ<T>`][`Vector<T>`]sub().(center), up) |
| 856 | } |
| 857 | |
| 858 | #[inline] |
| 859 | fn transform_point3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#transform_point3().(&self, other: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T> { |
| 860 | let mut res = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x.); |
| 861 | res = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 862 | res = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 863 | res = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 864 | res.into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().() |
| 865 | } |
| 866 | |
| 867 | #[inline] |
| 868 | fn transform_vector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#transform_vector3().(&self, other: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T> { |
| 869 | let mut res = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x.); |
| 870 | res = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 871 | res = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 872 | res.into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().() |
| 873 | } |
| 874 | |
| 875 | #[inline] |
| 876 | fn project_point3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#project_point3().(&self, other: XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T>) -> XYZrust-analyzer cargo glam 0.18.0 core/storage/XYZ#<T> { |
| 877 | let mut res = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.xrust-analyzer cargo glam 0.18.0 core/storage/XYZ#x.); |
| 878 | res = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.yrust-analyzer cargo glam 0.18.0 core/storage/XYZ#y.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 879 | res = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul_scalar().(other.zrust-analyzer cargo glam 0.18.0 core/storage/XYZ#z.).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 880 | res = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(res); |
| 881 | res = res.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(res.splat_wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#splat_w().().reciprust-analyzer cargo glam 0.18.0 core/traits/vector/FloatVector4#recip().()); |
| 882 | res.into_xyzrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_xyz().() |
| 883 | } |
| 884 | |
| 885 | fn transform_float4_as_point3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#transform_float4_as_point3().(&self, other: Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#) -> Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#; |
| 886 | fn transform_float4_as_vector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#transform_float4_as_vector3().(&self, other: Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#) -> Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#; |
| 887 | fn project_float4_as_point3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#project_float4_as_point3().(&self, other: Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#) -> Self::SIMDVector3rust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#SIMDVector3#; |
| 888 | |
| 889 | fn inverserust-analyzer cargo glam 0.18.0 core/traits/matrix/FloatMatrix4x4#inverse().(&self) -> Self { |
| 890 | let (m00, m01, m02, m03) = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 891 | let (m10, m11, m12, m13) = self.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 892 | let (m20, m21, m22, m23) = self.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 893 | let (m30, m31, m32, m33) = self.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().into_tuplerust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#into_tuple().(); |
| 894 | |
| 895 | let coef00 = m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23; |
| 896 | let coef02 = m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 897 | let coef03 = m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 898 | |
| 899 | let coef04 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23; |
| 900 | let coef06 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 901 | let coef07 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 902 | |
| 903 | let coef08 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m22; |
| 904 | let coef10 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m12; |
| 905 | let coef11 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m12; |
| 906 | |
| 907 | let coef12 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23; |
| 908 | let coef14 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 909 | let coef15 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m13; |
| 910 | |
| 911 | let coef16 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m22; |
| 912 | let coef18 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m12; |
| 913 | let coef19 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m12; |
| 914 | |
| 915 | let coef20 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m21; |
| 916 | let coef22 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m11; |
| 917 | let coef23 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#mul().m11; |
| 918 | |
| 919 | let fac0 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef00, coef00, coef02, coef03); |
| 920 | let fac1 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef04, coef04, coef06, coef07); |
| 921 | let fac2 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef08, coef08, coef10, coef11); |
| 922 | let fac3 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef12, coef12, coef14, coef15); |
| 923 | let fac4 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef16, coef16, coef18, coef19); |
| 924 | let fac5 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(coef20, coef20, coef22, coef23); |
| 925 | |
| 926 | let vec0 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m10, m00, m00, m00); |
| 927 | let vec1 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m11, m01, m01, m01); |
| 928 | let vec2 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m12, m02, m02, m02); |
| 929 | let vec3 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(m13, m03, m03, m03); |
| 930 | |
| 931 | let inv0 = vec1.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac0).subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(vec2.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac1)).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(vec3.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac2)); |
| 932 | let inv1 = vec0.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac0).subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(vec2.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac3)).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(vec3.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac4)); |
| 933 | let inv2 = vec0.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac1).subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(vec1.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac3)).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(vec3.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac5)); |
| 934 | let inv3 = vec0.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac2).subrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#sub().(vec1.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac4)).addrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#add().(vec2.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(fac5)); |
| 935 | |
| 936 | let sign_a = Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.); |
| 937 | let sign_b = Vector4rust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#neg().T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE., T::ONErust-analyzer cargo glam 0.18.0 core/traits/scalar/NumConstEx#ONE.); |
| 938 | |
| 939 | let inverse = Self::from_colsrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#from_cols().( |
| 940 | inv0.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(sign_a), |
| 941 | inv1.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(sign_b), |
| 942 | inv2.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(sign_a), |
| 943 | inv3.mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(sign_b), |
| 944 | ); |
| 945 | |
| 946 | let col0 = V4::newrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#new().( |
| 947 | inverse.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), |
| 948 | inverse.y_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#y_axis().().xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), |
| 949 | inverse.z_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#z_axis().().xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), |
| 950 | inverse.w_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#w_axis().().xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().(), |
| 951 | ); |
| 952 | |
| 953 | let dot0 = self.x_axisrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#x_axis().().mulrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector#mul().(col0); |
| 954 | let dot1 = dot0.xrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().dot0.yrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().dot0.zrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#z().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#add().dot0.wrust-analyzer cargo glam 0.18.0 core/traits/vector/Vector4#w().(); |
| 955 | |
| 956 | glam_assertrust-analyzer cargo glam 0.18.0 macros/glam_assert!!(dot1 != T::ZERO); |
| 957 | |
| 958 | let rcp_det = dot1.reciprust-analyzer cargo glam 0.18.0 core/traits/scalar/Float#recip().(); |
| 959 | inverse.mul_scalarrust-analyzer cargo glam 0.18.0 core/traits/matrix/Matrix4x4#mul_scalar().(rcp_det) |
| 960 | } |
| 961 | } |