| 1 | // Generated from mat.rs.tera template. Edit the template, not the generated file. |
| 2 | |
| 3 | use craterust-analyzer cargo glam 0.28.0 crate/::{f64rust-analyzer cargo glam 0.28.0 f64/::mathrust-analyzer cargo glam 0.28.0 f64/math/, swizzlesrust-analyzer cargo glam 0.28.0 swizzles/::*, DMat3rust-analyzer cargo glam 0.28.0 f64/dmat3/DMat3#, DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#, DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, EulerRotrust-analyzer cargo glam 0.28.0 euler/EulerRot#, Mat4rust-analyzer cargo glam 0.28.0 f32/sse2/mat4/Mat4#}; |
| 4 | #[cfg(not(target_arch = "spirv"))] |
| 5 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/; |
| 6 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::{Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#, Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#}; |
| 7 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::{Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#, AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#, Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#, DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#, Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#, MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#, Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#, Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#, SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#}; |
| 8 | |
| 9 | /// Creates a 4x4 matrix from four column vectors. |
| 10 | #[inline(always)] |
| 11 | #[must_use] |
| 12 | pub const fn dmat4rust-analyzer cargo glam 0.28.0 f64/dmat4/dmat4().(x_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, y_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, z_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, w_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 13 | DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(x_axis, y_axis, z_axis, w_axis) |
| 14 | } |
| 15 | |
| 16 | /// A 4x4 column major matrix. |
| 17 | /// |
| 18 | /// This 4x4 matrix type features convenience methods for creating and using affine transforms and |
| 19 | /// perspective projections. If you are primarily dealing with 3D affine transformations |
| 20 | /// considering using [`DAffine3`](crate::DAffine3) which is faster than a 4x4 matrix |
| 21 | /// for some affine operations. |
| 22 | /// |
| 23 | /// Affine transformations including 3D translation, rotation and scale can be created |
| 24 | /// using methods such as [`Self::from_translation()`], [`Self::from_quat()`], |
| 25 | /// [`Self::from_scale()`] and [`Self::from_scale_rotation_translation()`]. |
| 26 | /// |
| 27 | /// Orthographic projections can be created using the methods [`Self::orthographic_lh()`] for |
| 28 | /// left-handed coordinate systems and [`Self::orthographic_rh()`] for right-handed |
| 29 | /// systems. The resulting matrix is also an affine transformation. |
| 30 | /// |
| 31 | /// The [`Self::transform_point3()`] and [`Self::transform_vector3()`] convenience methods |
| 32 | /// are provided for performing affine transformations on 3D vectors and points. These |
| 33 | /// multiply 3D inputs as 4D vectors with an implicit `w` value of `1` for points and `0` |
| 34 | /// for vectors respectively. These methods assume that `Self` contains a valid affine |
| 35 | /// transform. |
| 36 | /// |
| 37 | /// Perspective projections can be created using methods such as |
| 38 | /// [`Self::perspective_lh()`], [`Self::perspective_infinite_lh()`] and |
| 39 | /// [`Self::perspective_infinite_reverse_lh()`] for left-handed co-ordinate systems and |
| 40 | /// [`Self::perspective_rh()`], [`Self::perspective_infinite_rh()`] and |
| 41 | /// [`Self::perspective_infinite_reverse_rh()`] for right-handed co-ordinate systems. |
| 42 | /// |
| 43 | /// The resulting perspective project can be use to transform 3D vectors as points with |
| 44 | /// perspective correction using the [`Self::project_point3()`] convenience method. |
| 45 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:)] |
| 46 | #[cfg_attr(feature = "cuda", repr(align(16)))] |
| 47 | #[repr(C)] |
| 48 | pub struct DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 49 | pub x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, |
| 50 | pub y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, |
| 51 | pub z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, |
| 52 | pub w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, |
| 53 | } |
| 54 | |
| 55 | impl DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 56 | /// A 4x4 matrix with all elements set to `0.0`. |
| 57 | pub const ZEROrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]ZERO.: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]ZERO., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]ZERO., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]ZERO., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]ZERO.); |
| 58 | |
| 59 | /// A 4x4 identity matrix, where all diagonal elements are `1`, and all off-diagonal elements are `0`. |
| 60 | pub const IDENTITYrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]IDENTITY.: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Xrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]X., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Yrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Y., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Zrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Z., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W.); |
| 61 | |
| 62 | /// All NAN:s. |
| 63 | pub const NANrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]NAN.: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::NANrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]NAN., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::NANrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]NAN., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::NANrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]NAN., DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::NANrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]NAN.); |
| 64 | |
| 65 | #[allow(clippy::too_many_arguments)] |
| 66 | #[inline(always)] |
| 67 | #[must_use] |
| 68 | const fn newrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]new().( |
| 69 | m00: f64, |
| 70 | m01: f64, |
| 71 | m02: f64, |
| 72 | m03: f64, |
| 73 | m10: f64, |
| 74 | m11: f64, |
| 75 | m12: f64, |
| 76 | m13: f64, |
| 77 | m20: f64, |
| 78 | m21: f64, |
| 79 | m22: f64, |
| 80 | m23: f64, |
| 81 | m30: f64, |
| 82 | m31: f64, |
| 83 | m32: f64, |
| 84 | m33: f64, |
| 85 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 86 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 87 | x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m00, m01, m02, m03), |
| 88 | y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m10, m11, m12, m13), |
| 89 | z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m20, m21, m22, m23), |
| 90 | w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m30, m31, m32, m33), |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | /// Creates a 4x4 matrix from four column vectors. |
| 95 | #[inline(always)] |
| 96 | #[must_use] |
| 97 | pub const fn from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(x_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, y_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, z_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, w_axis: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 98 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 99 | x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., |
| 100 | y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., |
| 101 | z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., |
| 102 | w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis., |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /// Creates a 4x4 matrix from a `[f64; 16]` array stored in column major order. |
| 107 | /// If your data is stored in row major you will need to `transpose` the returned |
| 108 | /// matrix. |
| 109 | #[inline] |
| 110 | #[must_use] |
| 111 | pub const fn from_cols_arrayrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols_array().(m: &[f64; 16]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 112 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::newrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]new().( |
| 113 | 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()., 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()., 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()., 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()., |
| 114 | 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()., |
| 115 | ) |
| 116 | } |
| 117 | |
| 118 | /// Creates a `[f64; 16]` array storing data in column major order. |
| 119 | /// If you require data in row major order `transpose` the matrix first. |
| 120 | #[inline] |
| 121 | #[must_use] |
| 122 | pub const fn to_cols_arrayrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]to_cols_array().(&self) -> [f64; 16] { |
| 123 | [ |
| 124 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 125 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., |
| 126 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., |
| 127 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., |
| 128 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 129 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., |
| 130 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., |
| 131 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., |
| 132 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 133 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., |
| 134 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., |
| 135 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., |
| 136 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 137 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., |
| 138 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., |
| 139 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., |
| 140 | ] |
| 141 | } |
| 142 | |
| 143 | /// Creates a 4x4 matrix from a `[[f64; 4]; 4]` 4D array stored in column major order. |
| 144 | /// If your data is in row major order you will need to `transpose` the returned |
| 145 | /// matrix. |
| 146 | #[inline] |
| 147 | #[must_use] |
| 148 | pub const fn from_cols_array_2drust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols_array_2d().(m: &[[f64; 4]; 4]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 149 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 150 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::from_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]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().), |
| 151 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::from_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]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().), |
| 152 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::from_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]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().), |
| 153 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::from_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]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().), |
| 154 | ) |
| 155 | } |
| 156 | |
| 157 | /// Creates a `[[f64; 4]; 4]` 4D array storing data in column major order. |
| 158 | /// If you require data in row major order `transpose` the matrix first. |
| 159 | #[inline] |
| 160 | #[must_use] |
| 161 | pub const fn to_cols_array_2drust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]to_cols_array_2d().(&self) -> [[f64; 4]; 4] { |
| 162 | [ |
| 163 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..to_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]to_array().(), |
| 164 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..to_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]to_array().(), |
| 165 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..to_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]to_array().(), |
| 166 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..to_arrayrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]to_array().(), |
| 167 | ] |
| 168 | } |
| 169 | |
| 170 | /// Creates a 4x4 matrix with its diagonal set to `diagonal` and all other entries set to 0. |
| 171 | #[doc(alias = "scale")] |
| 172 | #[inline] |
| 173 | #[must_use] |
| 174 | pub const fn from_diagonalrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_diagonal().(diagonal: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 175 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::newrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]new().( |
| 176 | diagonal.xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., 0.0, 0.0, 0.0, 0.0, diagonal.yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., 0.0, 0.0, 0.0, 0.0, diagonal.zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., 0.0, 0.0, |
| 177 | 0.0, 0.0, diagonal.wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., |
| 178 | ) |
| 179 | } |
| 180 | |
| 181 | #[inline] |
| 182 | #[must_use] |
| 183 | fn quat_to_axesrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]quat_to_axes().(rotation: DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#) -> (DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) { |
| 184 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(rotation.is_normalized()); |
| 185 | |
| 186 | let (x, y, z, w) = rotation.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 187 | let x2 = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().x; |
| 188 | let y2 = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().y; |
| 189 | let z2 = z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().z; |
| 190 | let xx = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().x2; |
| 191 | let xy = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().y2; |
| 192 | let xz = x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z2; |
| 193 | let yy = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().y2; |
| 194 | let yz = y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z2; |
| 195 | let zz = z rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z2; |
| 196 | let wx = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().x2; |
| 197 | let wy = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().y2; |
| 198 | let wz = w rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z2; |
| 199 | |
| 200 | let x_axis = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(yy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().zz), xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().wz, xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().wy, 0.0); |
| 201 | let y_axis = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().wz, 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().zz), yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().wx, 0.0); |
| 202 | let z_axis = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().wy, yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().wx, 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().yy), 0.0); |
| 203 | (x_axis, y_axis, z_axis) |
| 204 | } |
| 205 | |
| 206 | /// Creates an affine transformation matrix from the given 3D `scale`, `rotation` and |
| 207 | /// `translation`. |
| 208 | /// |
| 209 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 210 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 211 | /// |
| 212 | /// # Panics |
| 213 | /// |
| 214 | /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. |
| 215 | #[inline] |
| 216 | #[must_use] |
| 217 | pub fn from_scale_rotation_translationrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_scale_rotation_translation().( |
| 218 | scale: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, |
| 219 | rotation: DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#, |
| 220 | translation: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, |
| 221 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 222 | let (x_axis, y_axis, z_axis) = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::quat_to_axesrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]quat_to_axes().(rotation); |
| 223 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 224 | x_axis.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(scale.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), |
| 225 | y_axis.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(scale.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), |
| 226 | z_axis.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(scale.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.), |
| 227 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::fromrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`From<(DVec3, f64)>`]from().((translation, 1.0)), |
| 228 | ) |
| 229 | } |
| 230 | |
| 231 | /// Creates an affine transformation matrix from the given 3D `translation`. |
| 232 | /// |
| 233 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 234 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 235 | /// |
| 236 | /// # Panics |
| 237 | /// |
| 238 | /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. |
| 239 | #[inline] |
| 240 | #[must_use] |
| 241 | pub fn from_rotation_translationrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_rotation_translation().(rotation: DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#, translation: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 242 | let (x_axis, y_axis, z_axis) = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::quat_to_axesrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]quat_to_axes().(rotation); |
| 243 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(x_axis, y_axis, z_axis, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::fromrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`From<(DVec3, f64)>`]from().((translation, 1.0))) |
| 244 | } |
| 245 | |
| 246 | /// Extracts `scale`, `rotation` and `translation` from `self`. The input matrix is |
| 247 | /// expected to be a 3D affine transformation matrix otherwise the output will be invalid. |
| 248 | /// |
| 249 | /// # Panics |
| 250 | /// |
| 251 | /// Will panic if the determinant of `self` is zero or if the resulting scale vector |
| 252 | /// contains any zero elements when `glam_assert` is enabled. |
| 253 | #[inline] |
| 254 | #[must_use] |
| 255 | pub fn to_scale_rotation_translationrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]to_scale_rotation_translation().(&self) -> (DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#, DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) { |
| 256 | let det = self.determinantrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]determinant().(); |
| 257 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(det != 0.0); |
| 258 | |
| 259 | let scale = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().( |
| 260 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..lengthrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]length().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(det), |
| 261 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..lengthrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]length().(), |
| 262 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..lengthrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]length().(), |
| 263 | ); |
| 264 | |
| 265 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(scale.cmpne(DVec3::ZERO).all()); |
| 266 | |
| 267 | let inv_scale = scale.reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]recip().(); |
| 268 | |
| 269 | let rotation = DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#::from_rotation_axesrust-analyzer cargo glam 0.28.0 f64/dquat/impl#[DQuat]from_rotation_axes().( |
| 270 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(inv_scale.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.).xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().(), |
| 271 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(inv_scale.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.).xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().(), |
| 272 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(inv_scale.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.).xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().(), |
| 273 | ); |
| 274 | |
| 275 | let translation = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().(); |
| 276 | |
| 277 | (scale, rotation, translation) |
| 278 | } |
| 279 | |
| 280 | /// Creates an affine transformation matrix from the given `rotation` quaternion. |
| 281 | /// |
| 282 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 283 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 284 | /// |
| 285 | /// # Panics |
| 286 | /// |
| 287 | /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. |
| 288 | #[inline] |
| 289 | #[must_use] |
| 290 | pub fn from_quatrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_quat().(rotation: DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 291 | let (x_axis, y_axis, z_axis) = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::quat_to_axesrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]quat_to_axes().(rotation); |
| 292 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().(x_axis, y_axis, z_axis, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W.) |
| 293 | } |
| 294 | |
| 295 | /// Creates an affine transformation matrix from the given 3x3 linear transformation |
| 296 | /// matrix. |
| 297 | /// |
| 298 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 299 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 300 | #[inline] |
| 301 | #[must_use] |
| 302 | pub fn from_mat3rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_mat3().(m: DMat3rust-analyzer cargo glam 0.28.0 f64/dmat3/DMat3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 303 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 304 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::fromrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`From<(DVec3, f64)>`]from().((m.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat3/DMat3#x_axis., 0.0)), |
| 305 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::fromrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`From<(DVec3, f64)>`]from().((m.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat3/DMat3#y_axis., 0.0)), |
| 306 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::fromrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`From<(DVec3, f64)>`]from().((m.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat3/DMat3#z_axis., 0.0)), |
| 307 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 308 | ) |
| 309 | } |
| 310 | |
| 311 | /// Creates an affine transformation matrix from the given 3D `translation`. |
| 312 | /// |
| 313 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 314 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 315 | #[inline] |
| 316 | #[must_use] |
| 317 | pub fn from_translationrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_translation().(translation: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 318 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 319 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Xrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]X., |
| 320 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Yrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Y., |
| 321 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Zrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Z., |
| 322 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(translation.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., translation.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., translation.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., 1.0), |
| 323 | ) |
| 324 | } |
| 325 | |
| 326 | /// Creates an affine transformation matrix containing a 3D rotation around a normalized |
| 327 | /// rotation `axis` of `angle` (in radians). |
| 328 | /// |
| 329 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 330 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 331 | /// |
| 332 | /// # Panics |
| 333 | /// |
| 334 | /// Will panic if `axis` is not normalized when `glam_assert` is enabled. |
| 335 | #[inline] |
| 336 | #[must_use] |
| 337 | pub fn from_axis_anglerust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_axis_angle().(axis: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, angle: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 338 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(axis.is_normalized()); |
| 339 | |
| 340 | let (sin, cos) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(angle); |
| 341 | let axis_sin = axis.mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().(sin); |
| 342 | let axis_sq = axis.mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]mul().(axis); |
| 343 | let omc = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().cos; |
| 344 | let xyomc = axis.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().axis.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc; |
| 345 | let xzomc = axis.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().axis.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc; |
| 346 | let yzomc = axis.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().axis.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc; |
| 347 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 348 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 349 | axis_sq.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().cos, |
| 350 | xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().axis_sin.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., |
| 351 | xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().axis_sin.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., |
| 352 | 0.0, |
| 353 | ), |
| 354 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 355 | xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().axis_sin.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., |
| 356 | axis_sq.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().cos, |
| 357 | yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().axis_sin.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., |
| 358 | 0.0, |
| 359 | ), |
| 360 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 361 | xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().axis_sin.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., |
| 362 | yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().axis_sin.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., |
| 363 | axis_sq.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().cos, |
| 364 | 0.0, |
| 365 | ), |
| 366 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 367 | ) |
| 368 | } |
| 369 | |
| 370 | /// Creates a affine transformation matrix containing a rotation from the given euler |
| 371 | /// rotation sequence and angles (in radians). |
| 372 | /// |
| 373 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 374 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 375 | #[inline] |
| 376 | #[must_use] |
| 377 | pub fn from_eulerrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_euler().(order: EulerRotrust-analyzer cargo glam 0.28.0 euler/EulerRot#, a: f64, b: f64, c: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 378 | let quat = DQuatrust-analyzer cargo glam 0.28.0 f64/dquat/DQuat#::from_eulerrust-analyzer cargo glam 0.28.0 f64/dquat/impl#[DQuat]from_euler().(order, a, b, c); |
| 379 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_quatrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_quat().(quat) |
| 380 | } |
| 381 | |
| 382 | /// Creates an affine transformation matrix containing a 3D rotation around the x axis of |
| 383 | /// `angle` (in radians). |
| 384 | /// |
| 385 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 386 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 387 | #[inline] |
| 388 | #[must_use] |
| 389 | pub fn from_rotation_xrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_rotation_x().(angle: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 390 | let (sina, cosa) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(angle); |
| 391 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 392 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Xrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]X., |
| 393 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, cosa, sina, 0.0), |
| 394 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().sina, cosa, 0.0), |
| 395 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 396 | ) |
| 397 | } |
| 398 | |
| 399 | /// Creates an affine transformation matrix containing a 3D rotation around the y axis of |
| 400 | /// `angle` (in radians). |
| 401 | /// |
| 402 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 403 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 404 | #[inline] |
| 405 | #[must_use] |
| 406 | pub fn from_rotation_yrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_rotation_y().(angle: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 407 | let (sina, cosa) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(angle); |
| 408 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 409 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(cosa, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().sina, 0.0), |
| 410 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Yrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Y., |
| 411 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(sina, 0.0, cosa, 0.0), |
| 412 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 413 | ) |
| 414 | } |
| 415 | |
| 416 | /// Creates an affine transformation matrix containing a 3D rotation around the z axis of |
| 417 | /// `angle` (in radians). |
| 418 | /// |
| 419 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 420 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 421 | #[inline] |
| 422 | #[must_use] |
| 423 | pub fn from_rotation_zrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_rotation_z().(angle: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 424 | let (sina, cosa) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(angle); |
| 425 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 426 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(cosa, sina, 0.0, 0.0), |
| 427 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().sina, cosa, 0.0, 0.0), |
| 428 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Zrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]Z., |
| 429 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 430 | ) |
| 431 | } |
| 432 | |
| 433 | /// Creates an affine transformation matrix containing the given 3D non-uniform `scale`. |
| 434 | /// |
| 435 | /// The resulting matrix can be used to transform 3D points and vectors. See |
| 436 | /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. |
| 437 | /// |
| 438 | /// # Panics |
| 439 | /// |
| 440 | /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. |
| 441 | #[inline] |
| 442 | #[must_use] |
| 443 | pub fn from_scalerust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_scale().(scale: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 444 | // Do not panic as long as any component is non-zero |
| 445 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(scale.cmpne(DVec3::ZERO).any()); |
| 446 | |
| 447 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 448 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(scale.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., 0.0, 0.0, 0.0), |
| 449 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, scale.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., 0.0, 0.0), |
| 450 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, scale.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., 0.0), |
| 451 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::Wrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]W., |
| 452 | ) |
| 453 | } |
| 454 | |
| 455 | /// Creates a 4x4 matrix from the first 16 values in `slice`. |
| 456 | /// |
| 457 | /// # Panics |
| 458 | /// |
| 459 | /// Panics if `slice` is less than 16 elements long. |
| 460 | #[inline] |
| 461 | #[must_use] |
| 462 | pub const fn from_cols_slicerust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols_slice().(slice: &[f64]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 463 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::newrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]new().( |
| 464 | slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., |
| 465 | slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., slice[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()., |
| 466 | ) |
| 467 | } |
| 468 | |
| 469 | /// Writes the columns of `self` to the first 16 elements in `slice`. |
| 470 | /// |
| 471 | /// # Panics |
| 472 | /// |
| 473 | /// Panics if `slice` is less than 16 elements long. |
| 474 | #[inline] |
| 475 | pub fn write_cols_to_slicerust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]write_cols_to_slice().(self, slice: &mut [f64]) { |
| 476 | 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(). = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.; |
| 477 | 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(). = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.; |
| 478 | 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(). = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.; |
| 479 | 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(). = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.; |
| 480 | 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(). = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.; |
| 481 | 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(). = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.; |
| 482 | 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(). = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.; |
| 483 | 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(). = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.; |
| 484 | 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(). = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.; |
| 485 | 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(). = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.; |
| 486 | 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(). = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.; |
| 487 | 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(). = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.; |
| 488 | 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(). = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.; |
| 489 | 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(). = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.; |
| 490 | 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(). = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.; |
| 491 | 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(). = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.; |
| 492 | } |
| 493 | |
| 494 | /// Returns the matrix column for the given `index`. |
| 495 | /// |
| 496 | /// # Panics |
| 497 | /// |
| 498 | /// Panics if `index` is greater than 3. |
| 499 | #[inline] |
| 500 | #[must_use] |
| 501 | pub fn colrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]col().(&self, index: usize) -> DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4# { |
| 502 | match index { |
| 503 | 0 => self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., |
| 504 | 1 => self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., |
| 505 | 2 => self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., |
| 506 | 3 => self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis., |
| 507 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | /// Returns a mutable reference to the matrix column for the given `index`. |
| 512 | /// |
| 513 | /// # Panics |
| 514 | /// |
| 515 | /// Panics if `index` is greater than 3. |
| 516 | #[inline] |
| 517 | pub fn col_mutrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]col_mut().(&mut self, index: usize) -> &mut DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4# { |
| 518 | match index { |
| 519 | 0 => &mut self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., |
| 520 | 1 => &mut self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., |
| 521 | 2 => &mut self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., |
| 522 | 3 => &mut self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis., |
| 523 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | /// Returns the matrix row for the given `index`. |
| 528 | /// |
| 529 | /// # Panics |
| 530 | /// |
| 531 | /// Panics if `index` is greater than 3. |
| 532 | #[inline] |
| 533 | #[must_use] |
| 534 | pub fn rowrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]row().(&self, index: usize) -> DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4# { |
| 535 | match index { |
| 536 | 0 => DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.), |
| 537 | 1 => DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.), |
| 538 | 2 => DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.), |
| 539 | 3 => DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.), |
| 540 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | /// Returns `true` if, and only if, all elements are finite. |
| 545 | /// If any element is either `NaN`, positive or negative infinity, this will return `false`. |
| 546 | #[inline] |
| 547 | #[must_use] |
| 548 | pub fn is_finiterust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]is_finite().(&self) -> bool { |
| 549 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..is_finiterust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_finite().() |
| 550 | && self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..is_finiterust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_finite().() |
| 551 | && self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..is_finiterust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_finite().() |
| 552 | && self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..is_finiterust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_finite().() |
| 553 | } |
| 554 | |
| 555 | /// Returns `true` if any elements are `NaN`. |
| 556 | #[inline] |
| 557 | #[must_use] |
| 558 | pub fn is_nanrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]is_nan().(&self) -> bool { |
| 559 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..is_nanrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_nan().() || self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..is_nanrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_nan().() || self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..is_nanrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_nan().() || self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..is_nanrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]is_nan().() |
| 560 | } |
| 561 | |
| 562 | /// Returns the transpose of `self`. |
| 563 | #[inline] |
| 564 | #[must_use] |
| 565 | pub fn transposerust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]transpose().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 566 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 567 | x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.), |
| 568 | y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.), |
| 569 | z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.), |
| 570 | w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.), |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | /// Returns the determinant of `self`. |
| 575 | #[must_use] |
| 576 | pub fn determinantrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]determinant().(&self) -> f64 { |
| 577 | let (m00, m01, m02, m03) = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 578 | let (m10, m11, m12, m13) = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 579 | let (m20, m21, m22, m23) = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 580 | let (m30, m31, m32, m33) = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 581 | |
| 582 | let a2323 = m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32; |
| 583 | let a1323 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m31; |
| 584 | let a1223 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m31; |
| 585 | let a0323 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m30; |
| 586 | let a0223 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m30; |
| 587 | let a0123 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m30; |
| 588 | |
| 589 | m00 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a2323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a1323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a1223) |
| 590 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m01 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a2323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0223) |
| 591 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().m02 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a1323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0323 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().m13 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0123) |
| 592 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m03 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a1223 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0223 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a0123) |
| 593 | } |
| 594 | |
| 595 | /// Returns the inverse of `self`. |
| 596 | /// |
| 597 | /// If the matrix is not invertible the returned matrix will be invalid. |
| 598 | /// |
| 599 | /// # Panics |
| 600 | /// |
| 601 | /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. |
| 602 | #[must_use] |
| 603 | pub fn inverserust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]inverse().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 604 | let (m00, m01, m02, m03) = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 605 | let (m10, m11, m12, m13) = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 606 | let (m20, m21, m22, m23) = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 607 | let (m30, m31, m32, m33) = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 608 | |
| 609 | let coef00 = m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23; |
| 610 | let coef02 = m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 611 | let coef03 = m12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 612 | |
| 613 | let coef04 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23; |
| 614 | let coef06 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 615 | let coef07 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 616 | |
| 617 | let coef08 = m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m22; |
| 618 | let coef10 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m12; |
| 619 | let coef11 = m11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m12; |
| 620 | |
| 621 | let coef12 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23; |
| 622 | let coef14 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m33 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 623 | let coef15 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m23 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m13; |
| 624 | |
| 625 | let coef16 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m22; |
| 626 | let coef18 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m12; |
| 627 | let coef19 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m22 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m12; |
| 628 | |
| 629 | let coef20 = m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m21; |
| 630 | let coef22 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m31 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m30 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m11; |
| 631 | let coef23 = m10 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m21 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().m20 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().m11; |
| 632 | |
| 633 | let fac0 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef00, coef00, coef02, coef03); |
| 634 | let fac1 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef04, coef04, coef06, coef07); |
| 635 | let fac2 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef08, coef08, coef10, coef11); |
| 636 | let fac3 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef12, coef12, coef14, coef15); |
| 637 | let fac4 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef16, coef16, coef18, coef19); |
| 638 | let fac5 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(coef20, coef20, coef22, coef23); |
| 639 | |
| 640 | let vec0 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m10, m00, m00, m00); |
| 641 | let vec1 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m11, m01, m01, m01); |
| 642 | let vec2 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m12, m02, m02, m02); |
| 643 | let vec3 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(m13, m03, m03, m03); |
| 644 | |
| 645 | let inv0 = vec1.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac0).subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(vec2.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac1)).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(vec3.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac2)); |
| 646 | let inv1 = vec0.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac0).subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(vec2.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac3)).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(vec3.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac4)); |
| 647 | let inv2 = vec0.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac1).subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(vec1.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac3)).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(vec3.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac5)); |
| 648 | let inv3 = vec0.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac2).subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(vec1.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac4)).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(vec2.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(fac5)); |
| 649 | |
| 650 | let sign_a = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, 1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0); |
| 651 | let sign_b = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, 1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, 1.0); |
| 652 | |
| 653 | let inverse = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 654 | inv0.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(sign_a), |
| 655 | inv1.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(sign_b), |
| 656 | inv2.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(sign_a), |
| 657 | inv3.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(sign_b), |
| 658 | ); |
| 659 | |
| 660 | let col0 = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 661 | inverse.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 662 | inverse.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 663 | inverse.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 664 | inverse.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x., |
| 665 | ); |
| 666 | |
| 667 | let dot0 = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(col0); |
| 668 | let dot1 = dot0.xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().dot0.yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().dot0.zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().dot0.wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.; |
| 669 | |
| 670 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(dot1 != 0.0); |
| 671 | |
| 672 | let rcp_det = dot1.reciprust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]recip().(); |
| 673 | inverse.mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<f64>`]mul().(rcp_det) |
| 674 | } |
| 675 | |
| 676 | /// Creates a left-handed view matrix using a camera position, an up direction, and a facing |
| 677 | /// direction. |
| 678 | /// |
| 679 | /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. |
| 680 | #[inline] |
| 681 | #[must_use] |
| 682 | pub fn look_to_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_to_lh().(eye: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, dir: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, up: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 683 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::look_to_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_to_rh().(eye, -rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg]neg().dir, up) |
| 684 | } |
| 685 | |
| 686 | /// Creates a right-handed view matrix using a camera position, an up direction, and a facing |
| 687 | /// direction. |
| 688 | /// |
| 689 | /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. |
| 690 | #[inline] |
| 691 | #[must_use] |
| 692 | pub fn look_to_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_to_rh().(eye: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, dir: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, up: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 693 | let f = dir.normalizerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize().(); |
| 694 | let s = f.crossrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cross().(up).normalizerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize().(); |
| 695 | let u = s.crossrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cross().(f); |
| 696 | |
| 697 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 698 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(s.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., u.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().f.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., 0.0), |
| 699 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(s.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., u.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().f.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., 0.0), |
| 700 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(s.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., u.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().f.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., 0.0), |
| 701 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().eye.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(s), -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().eye.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(u), eye.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(f), 1.0), |
| 702 | ) |
| 703 | } |
| 704 | |
| 705 | /// Creates a left-handed view matrix using a camera position, an up direction, and a focal |
| 706 | /// point. |
| 707 | /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. |
| 708 | /// |
| 709 | /// # Panics |
| 710 | /// |
| 711 | /// Will panic if `up` is not normalized when `glam_assert` is enabled. |
| 712 | #[inline] |
| 713 | #[must_use] |
| 714 | pub fn look_at_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_at_lh().(eye: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, center: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, up: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 715 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(up.is_normalized()); |
| 716 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::look_to_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_to_lh().(eye, center.subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().(eye), up) |
| 717 | } |
| 718 | |
| 719 | /// Creates a right-handed view matrix using a camera position, an up direction, and a focal |
| 720 | /// point. |
| 721 | /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. |
| 722 | /// |
| 723 | /// # Panics |
| 724 | /// |
| 725 | /// Will panic if `up` is not normalized when `glam_assert` is enabled. |
| 726 | #[inline] |
| 727 | pub fn look_at_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_at_rh().(eye: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, center: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#, up: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 728 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(up.is_normalized()); |
| 729 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::look_to_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]look_to_rh().(eye, center.subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().(eye), up) |
| 730 | } |
| 731 | |
| 732 | /// Creates a right-handed perspective projection matrix with [-1,1] depth range. |
| 733 | /// This is the same as the OpenGL `gluPerspective` function. |
| 734 | /// See <https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml> |
| 735 | #[inline] |
| 736 | #[must_use] |
| 737 | pub fn perspective_rh_glrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_rh_gl().( |
| 738 | fov_y_radians: f64, |
| 739 | aspect_ratio: f64, |
| 740 | z_near: f64, |
| 741 | z_far: f64, |
| 742 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 743 | let inv_length = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(z_near rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().z_far); |
| 744 | let f = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::tanrust-analyzer cargo glam 0.28.0 f64/math/std_math/tan().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 745 | let a = f rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio; |
| 746 | let b = (z_near rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().z_far) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().inv_length; |
| 747 | let c = (2.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z_near rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z_far) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().inv_length; |
| 748 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 749 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(a, 0.0, 0.0, 0.0), |
| 750 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, f, 0.0, 0.0), |
| 751 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, b, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0), |
| 752 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, c, 0.0), |
| 753 | ) |
| 754 | } |
| 755 | |
| 756 | /// Creates a left-handed perspective projection matrix with `[0,1]` depth range. |
| 757 | /// |
| 758 | /// # Panics |
| 759 | /// |
| 760 | /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is |
| 761 | /// enabled. |
| 762 | #[inline] |
| 763 | #[must_use] |
| 764 | pub fn perspective_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_lh().(fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 765 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0 && z_far > 0.0); |
| 766 | let (sin_fov, cos_fov) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 767 | let h = cos_fov rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().sin_fov; |
| 768 | let w = h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio; |
| 769 | let r = z_far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(z_far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().z_near); |
| 770 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 771 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(w, 0.0, 0.0, 0.0), |
| 772 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, h, 0.0, 0.0), |
| 773 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, r, 1.0), |
| 774 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z_near, 0.0), |
| 775 | ) |
| 776 | } |
| 777 | |
| 778 | /// Creates a right-handed perspective projection matrix with `[0,1]` depth range. |
| 779 | /// |
| 780 | /// # Panics |
| 781 | /// |
| 782 | /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is |
| 783 | /// enabled. |
| 784 | #[inline] |
| 785 | #[must_use] |
| 786 | pub fn perspective_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_rh().(fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 787 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0 && z_far > 0.0); |
| 788 | let (sin_fov, cos_fov) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 789 | let h = cos_fov rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().sin_fov; |
| 790 | let w = h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio; |
| 791 | let r = z_far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(z_near rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().z_far); |
| 792 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 793 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(w, 0.0, 0.0, 0.0), |
| 794 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, h, 0.0, 0.0), |
| 795 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, r, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0), |
| 796 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().z_near, 0.0), |
| 797 | ) |
| 798 | } |
| 799 | |
| 800 | /// Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range. |
| 801 | /// |
| 802 | /// # Panics |
| 803 | /// |
| 804 | /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. |
| 805 | #[inline] |
| 806 | #[must_use] |
| 807 | pub fn perspective_infinite_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_infinite_lh().(fov_y_radians: f64, aspect_ratio: f64, z_near: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 808 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0); |
| 809 | let (sin_fov, cos_fov) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 810 | let h = cos_fov rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().sin_fov; |
| 811 | let w = h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio; |
| 812 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 813 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(w, 0.0, 0.0, 0.0), |
| 814 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, h, 0.0, 0.0), |
| 815 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, 1.0, 1.0), |
| 816 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().z_near, 0.0), |
| 817 | ) |
| 818 | } |
| 819 | |
| 820 | /// Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range. |
| 821 | /// |
| 822 | /// # Panics |
| 823 | /// |
| 824 | /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. |
| 825 | #[inline] |
| 826 | #[must_use] |
| 827 | pub fn perspective_infinite_reverse_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_infinite_reverse_lh().( |
| 828 | fov_y_radians: f64, |
| 829 | aspect_ratio: f64, |
| 830 | z_near: f64, |
| 831 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 832 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0); |
| 833 | let (sin_fov, cos_fov) = mathrust-analyzer cargo glam 0.28.0 f64/math/::sin_cosrust-analyzer cargo glam 0.28.0 f64/math/std_math/sin_cos().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 834 | let h = cos_fov rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().sin_fov; |
| 835 | let w = h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio; |
| 836 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 837 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(w, 0.0, 0.0, 0.0), |
| 838 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, h, 0.0, 0.0), |
| 839 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, 0.0, 1.0), |
| 840 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, z_near, 0.0), |
| 841 | ) |
| 842 | } |
| 843 | |
| 844 | /// Creates an infinite right-handed perspective projection matrix with |
| 845 | /// `[0,1]` depth range. |
| 846 | #[inline] |
| 847 | #[must_use] |
| 848 | pub fn perspective_infinite_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_infinite_rh().(fov_y_radians: f64, aspect_ratio: f64, z_near: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 849 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0); |
| 850 | let f = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::tanrust-analyzer cargo glam 0.28.0 f64/math/std_math/tan().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 851 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 852 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(f rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio, 0.0, 0.0, 0.0), |
| 853 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, f, 0.0, 0.0), |
| 854 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0), |
| 855 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().z_near, 0.0), |
| 856 | ) |
| 857 | } |
| 858 | |
| 859 | /// Creates an infinite reverse right-handed perspective projection matrix |
| 860 | /// with `[0,1]` depth range. |
| 861 | #[inline] |
| 862 | #[must_use] |
| 863 | pub fn perspective_infinite_reverse_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]perspective_infinite_reverse_rh().( |
| 864 | fov_y_radians: f64, |
| 865 | aspect_ratio: f64, |
| 866 | z_near: f64, |
| 867 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 868 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(z_near > 0.0); |
| 869 | let f = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::tanrust-analyzer cargo glam 0.28.0 f64/math/std_math/tan().(0.5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().fov_y_radians); |
| 870 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 871 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(f rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().aspect_ratio, 0.0, 0.0, 0.0), |
| 872 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, f, 0.0, 0.0), |
| 873 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0), |
| 874 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, z_near, 0.0), |
| 875 | ) |
| 876 | } |
| 877 | |
| 878 | /// Creates a right-handed orthographic projection matrix with `[-1,1]` depth |
| 879 | /// range. This is the same as the OpenGL `glOrtho` function in OpenGL. |
| 880 | /// See |
| 881 | /// <https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml> |
| 882 | #[inline] |
| 883 | #[must_use] |
| 884 | pub fn orthographic_rh_glrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]orthographic_rh_gl().( |
| 885 | left: f64, |
| 886 | right: f64, |
| 887 | bottom: f64, |
| 888 | top: f64, |
| 889 | near: f64, |
| 890 | far: f64, |
| 891 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 892 | let a = 2.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().left); |
| 893 | let b = 2.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().bottom); |
| 894 | let c = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().2.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().near); |
| 895 | let tx = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().left) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().left); |
| 896 | let ty = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().bottom) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().bottom); |
| 897 | let tz = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().near) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().near); |
| 898 | |
| 899 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 900 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(a, 0.0, 0.0, 0.0), |
| 901 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, b, 0.0, 0.0), |
| 902 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, c, 0.0), |
| 903 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(tx, ty, tz, 1.0), |
| 904 | ) |
| 905 | } |
| 906 | |
| 907 | /// Creates a left-handed orthographic projection matrix with `[0,1]` depth range. |
| 908 | #[inline] |
| 909 | #[must_use] |
| 910 | pub fn orthographic_lhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]orthographic_lh().( |
| 911 | left: f64, |
| 912 | right: f64, |
| 913 | bottom: f64, |
| 914 | top: f64, |
| 915 | near: f64, |
| 916 | far: f64, |
| 917 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 918 | let rcp_width = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().left); |
| 919 | let rcp_height = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().bottom); |
| 920 | let r = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(far rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().near); |
| 921 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 922 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(rcp_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().rcp_width, 0.0, 0.0, 0.0), |
| 923 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, rcp_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().rcp_height, 0.0, 0.0), |
| 924 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, r, 0.0), |
| 925 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 926 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(left rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().right) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rcp_width, |
| 927 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().bottom) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rcp_height, |
| 928 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().near, |
| 929 | 1.0, |
| 930 | ), |
| 931 | ) |
| 932 | } |
| 933 | |
| 934 | /// Creates a right-handed orthographic projection matrix with `[0,1]` depth range. |
| 935 | #[inline] |
| 936 | #[must_use] |
| 937 | pub fn orthographic_rhrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]orthographic_rh().( |
| 938 | left: f64, |
| 939 | right: f64, |
| 940 | bottom: f64, |
| 941 | top: f64, |
| 942 | near: f64, |
| 943 | far: f64, |
| 944 | ) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 945 | let rcp_width = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().left); |
| 946 | let rcp_height = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().bottom); |
| 947 | let r = 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(near rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().far); |
| 948 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 949 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(rcp_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().rcp_width, 0.0, 0.0, 0.0), |
| 950 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, rcp_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().rcp_height, 0.0, 0.0), |
| 951 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(0.0, 0.0, r, 0.0), |
| 952 | DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().( |
| 953 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(left rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().right) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rcp_width, |
| 954 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().bottom) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rcp_height, |
| 955 | r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().near, |
| 956 | 1.0, |
| 957 | ), |
| 958 | ) |
| 959 | } |
| 960 | |
| 961 | /// Transforms the given 3D vector as a point, applying perspective correction. |
| 962 | /// |
| 963 | /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is `1.0`. |
| 964 | /// The perspective divide is performed meaning the resulting 3D vector is divided by `w`. |
| 965 | /// |
| 966 | /// This method assumes that `self` contains a projective transform. |
| 967 | #[inline] |
| 968 | #[must_use] |
| 969 | pub fn project_point3rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]project_point3().(&self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# { |
| 970 | let mut res = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.); |
| 971 | res = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 972 | res = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 973 | res = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 974 | res = res.mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<Self>`]mul().(res.wwwwrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]wwww().().reciprust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]recip().()); |
| 975 | res.xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().() |
| 976 | } |
| 977 | |
| 978 | /// Transforms the given 3D vector as a point. |
| 979 | /// |
| 980 | /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is |
| 981 | /// `1.0`. |
| 982 | /// |
| 983 | /// This method assumes that `self` contains a valid affine transform. It does not perform |
| 984 | /// a perspective divide, if `self` contains a perspective transform, or if you are unsure, |
| 985 | /// the [`Self::project_point3()`] method should be used instead. |
| 986 | /// |
| 987 | /// # Panics |
| 988 | /// |
| 989 | /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. |
| 990 | #[inline] |
| 991 | #[must_use] |
| 992 | pub fn transform_point3rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]transform_point3().(&self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# { |
| 993 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(self.row(3).abs_diff_eq(DVec4::W, 1e-6)); |
| 994 | let mut res = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.); |
| 995 | res = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 996 | res = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 997 | res = self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 998 | res.xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().() |
| 999 | } |
| 1000 | |
| 1001 | /// Transforms the give 3D vector as a direction. |
| 1002 | /// |
| 1003 | /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is |
| 1004 | /// `0.0`. |
| 1005 | /// |
| 1006 | /// This method assumes that `self` contains a valid affine transform. |
| 1007 | /// |
| 1008 | /// # Panics |
| 1009 | /// |
| 1010 | /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. |
| 1011 | #[inline] |
| 1012 | #[must_use] |
| 1013 | pub fn transform_vector3rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]transform_vector3().(&self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# { |
| 1014 | glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(self.row(3).abs_diff_eq(DVec4::W, 1e-6)); |
| 1015 | let mut res = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.); |
| 1016 | res = self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 1017 | res = self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.).addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(res); |
| 1018 | res.xyzrust-analyzer cargo glam 0.28.0 swizzles/dvec4_impl/impl#[DVec4][Vec4Swizzles]xyz().() |
| 1019 | } |
| 1020 | |
| 1021 | /// Transforms a 4D vector. |
| 1022 | #[inline] |
| 1023 | #[must_use] |
| 1024 | pub fn mul_vec4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_vec4().(&self, rhs: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4# { |
| 1025 | let mut res = self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.); |
| 1026 | res = res.addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.)); |
| 1027 | res = res.addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.)); |
| 1028 | res = res.addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs.wrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#w.)); |
| 1029 | res |
| 1030 | } |
| 1031 | |
| 1032 | /// Multiplies two 4x4 matrices. |
| 1033 | #[inline] |
| 1034 | #[must_use] |
| 1035 | pub fn mul_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_mat4().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1036 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1037 | self.mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]mul().(rhs.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.), |
| 1038 | self.mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]mul().(rhs.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.), |
| 1039 | self.mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]mul().(rhs.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.), |
| 1040 | self.mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]mul().(rhs.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.), |
| 1041 | ) |
| 1042 | } |
| 1043 | |
| 1044 | /// Adds two 4x4 matrices. |
| 1045 | #[inline] |
| 1046 | #[must_use] |
| 1047 | pub fn add_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]add_mat4().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1048 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1049 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(rhs.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.), |
| 1050 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(rhs.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.), |
| 1051 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(rhs.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.), |
| 1052 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..addrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Add<Self>`]add().(rhs.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.), |
| 1053 | ) |
| 1054 | } |
| 1055 | |
| 1056 | /// Subtracts two 4x4 matrices. |
| 1057 | #[inline] |
| 1058 | #[must_use] |
| 1059 | pub fn sub_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]sub_mat4().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1060 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1061 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(rhs.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.), |
| 1062 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(rhs.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.), |
| 1063 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(rhs.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.), |
| 1064 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..subrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Sub<Self>`]sub().(rhs.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.), |
| 1065 | ) |
| 1066 | } |
| 1067 | |
| 1068 | /// Multiplies a 4x4 matrix by a scalar. |
| 1069 | #[inline] |
| 1070 | #[must_use] |
| 1071 | pub fn mul_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_scalar().(&self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1072 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1073 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs), |
| 1074 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs), |
| 1075 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs), |
| 1076 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..mulrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Mul<f64>`]mul().(rhs), |
| 1077 | ) |
| 1078 | } |
| 1079 | |
| 1080 | /// Divides a 4x4 matrix by a scalar. |
| 1081 | #[inline] |
| 1082 | #[must_use] |
| 1083 | pub fn div_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]div_scalar().(&self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1084 | let rhs = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::splatrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]splat().(rhs); |
| 1085 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1086 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..divrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Div<Self>`]div().(rhs), |
| 1087 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..divrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Div<Self>`]div().(rhs), |
| 1088 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..divrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Div<Self>`]div().(rhs), |
| 1089 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..divrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`Div<Self>`]div().(rhs), |
| 1090 | ) |
| 1091 | } |
| 1092 | |
| 1093 | /// Returns true if the absolute difference of all elements between `self` and `rhs` |
| 1094 | /// is less than or equal to `max_abs_diff`. |
| 1095 | /// |
| 1096 | /// This can be used to compare if two matrices contain similar elements. It works best |
| 1097 | /// when comparing with a known value. The `max_abs_diff` that should be used used |
| 1098 | /// depends on the values being compared against. |
| 1099 | /// |
| 1100 | /// For more see |
| 1101 | /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). |
| 1102 | #[inline] |
| 1103 | #[must_use] |
| 1104 | pub fn abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]abs_diff_eq().(&self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4], max_abs_diff: f64) -> bool { |
| 1105 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs_diff_eq().(rhs.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., max_abs_diff) |
| 1106 | && self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs_diff_eq().(rhs.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., max_abs_diff) |
| 1107 | && self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs_diff_eq().(rhs.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., max_abs_diff) |
| 1108 | && self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs_diff_eq().(rhs.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis., max_abs_diff) |
| 1109 | } |
| 1110 | |
| 1111 | /// Takes the absolute value of each element in `self` |
| 1112 | #[inline] |
| 1113 | #[must_use] |
| 1114 | pub fn absrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]abs().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4] { |
| 1115 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1116 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..absrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs().(), |
| 1117 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..absrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs().(), |
| 1118 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..absrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs().(), |
| 1119 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..absrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]abs().(), |
| 1120 | ) |
| 1121 | } |
| 1122 | |
| 1123 | #[inline] |
| 1124 | pub fn as_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]as_mat4().(&self) -> Mat4rust-analyzer cargo glam 0.28.0 f32/sse2/mat4/Mat4# { |
| 1125 | Mat4rust-analyzer cargo glam 0.28.0 f32/sse2/mat4/Mat4#::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat4/impl#[Mat4]from_cols().( |
| 1126 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..as_vec4rust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]as_vec4().(), |
| 1127 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..as_vec4rust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]as_vec4().(), |
| 1128 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..as_vec4rust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]as_vec4().(), |
| 1129 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..as_vec4rust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]as_vec4().(), |
| 1130 | ) |
| 1131 | } |
| 1132 | } |
| 1133 | |
| 1134 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1135 | #[inline] |
| 1136 | fn defaultrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Default]default().() -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Default] { |
| 1137 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Default]::IDENTITYrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]IDENTITY. |
| 1138 | } |
| 1139 | } |
| 1140 | |
| 1141 | impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1142 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]; |
| 1143 | #[inline] |
| 1144 | fn addrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]add().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#Output# { |
| 1145 | self.add_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]add_mat4().(&rhs) |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | impl AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1150 | #[inline] |
| 1151 | fn add_assignrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AddAssign<Self>`]add_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AddAssign<Self>`]) { |
| 1152 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.add_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]add_mat4().(&rhs); |
| 1153 | } |
| 1154 | } |
| 1155 | |
| 1156 | impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1157 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sub<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sub<Self>`]; |
| 1158 | #[inline] |
| 1159 | fn subrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sub<Self>`]sub().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sub<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sub<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#Output# { |
| 1160 | self.sub_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]sub_mat4().(&rhs) |
| 1161 | } |
| 1162 | } |
| 1163 | |
| 1164 | impl SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1165 | #[inline] |
| 1166 | fn sub_assignrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`SubAssign<Self>`]sub_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`SubAssign<Self>`]) { |
| 1167 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.sub_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]sub_mat4().(&rhs); |
| 1168 | } |
| 1169 | } |
| 1170 | |
| 1171 | impl Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1172 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Neg]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Neg]; |
| 1173 | #[inline] |
| 1174 | fn negrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Neg]neg().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Neg]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#Output# { |
| 1175 | Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Neg]::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]from_cols().( |
| 1176 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..negrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][Neg]neg().(), |
| 1177 | self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..negrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][Neg]neg().(), |
| 1178 | self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..negrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][Neg]neg().(), |
| 1179 | self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..negrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][Neg]neg().(), |
| 1180 | ) |
| 1181 | } |
| 1182 | } |
| 1183 | |
| 1184 | impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1185 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]; |
| 1186 | #[inline] |
| 1187 | fn mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]mul().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# { |
| 1188 | self.mul_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_mat4().(&rhs) |
| 1189 | } |
| 1190 | } |
| 1191 | |
| 1192 | impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1193 | #[inline] |
| 1194 | fn mul_assignrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`MulAssign<Self>`]mul_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`MulAssign<Self>`]) { |
| 1195 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.mul_mat4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_mat4().(&rhs); |
| 1196 | } |
| 1197 | } |
| 1198 | |
| 1199 | impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1200 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]Output# = DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#; |
| 1201 | #[inline] |
| 1202 | fn mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]mul().(self, rhs: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<DVec4>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# { |
| 1203 | self.mul_vec4rust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_vec4().(rhs) |
| 1204 | } |
| 1205 | } |
| 1206 | |
| 1207 | impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for f64 { |
| 1208 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Mul<DMat4>`]Output# = DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#; |
| 1209 | #[inline] |
| 1210 | fn mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Mul<DMat4>`]mul().(self, rhs: DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Mul<DMat4>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# { |
| 1211 | rhs.mul_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_scalar().(self) |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<f64> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1216 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<f64>`]; |
| 1217 | #[inline] |
| 1218 | fn mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<f64>`]mul().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<f64>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# { |
| 1219 | self.mul_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_scalar().(rhs) |
| 1220 | } |
| 1221 | } |
| 1222 | |
| 1223 | impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<f64> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1224 | #[inline] |
| 1225 | fn mul_assignrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`MulAssign<f64>`]mul_assign().(&mut self, rhs: f64) { |
| 1226 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.mul_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]mul_scalar().(rhs); |
| 1227 | } |
| 1228 | } |
| 1229 | |
| 1230 | impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#> for f64 { |
| 1231 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Div<DMat4>`]Output# = DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#; |
| 1232 | #[inline] |
| 1233 | fn divrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Div<DMat4>`]div().(self, rhs: DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[f64][`Div<DMat4>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# { |
| 1234 | rhs.div_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]div_scalar().(self) |
| 1235 | } |
| 1236 | } |
| 1237 | |
| 1238 | impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<f64> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1239 | type Outputrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Div<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Div<f64>`]; |
| 1240 | #[inline] |
| 1241 | fn divrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Div<f64>`]div().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Div<f64>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# { |
| 1242 | self.div_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]div_scalar().(rhs) |
| 1243 | } |
| 1244 | } |
| 1245 | |
| 1246 | impl DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<f64> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1247 | #[inline] |
| 1248 | fn div_assignrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`DivAssign<f64>`]div_assign().(&mut self, rhs: f64) { |
| 1249 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.div_scalarrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]div_scalar().(rhs); |
| 1250 | } |
| 1251 | } |
| 1252 | |
| 1253 | impl Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`]> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1254 | fn sumrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`] |
| 1255 | where |
| 1256 | I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`]>, |
| 1257 | { |
| 1258 | iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`]::ZEROrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]ZERO., Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<Self>`]::addrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]add().) |
| 1259 | } |
| 1260 | } |
| 1261 | |
| 1262 | impl<'a> Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<&'a Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`]> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1263 | fn sumrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`] |
| 1264 | where |
| 1265 | I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = &'a Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`]>, |
| 1266 | { |
| 1267 | iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`]::ZEROrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]ZERO., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Sum<&'a DMat4>`]::addrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Add<Self>`]add().(a, b)) |
| 1268 | } |
| 1269 | } |
| 1270 | |
| 1271 | impl Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1272 | fn productrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<Self>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<Self>`] |
| 1273 | where |
| 1274 | I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<Self>`]>, |
| 1275 | { |
| 1276 | iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<Self>`]::IDENTITYrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]IDENTITY., Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<Self>`]::mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]mul().) |
| 1277 | } |
| 1278 | } |
| 1279 | |
| 1280 | impl<'a> Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#<&'a Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`]> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1281 | fn productrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`] |
| 1282 | where |
| 1283 | I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = &'a Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`]>, |
| 1284 | { |
| 1285 | iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`]::IDENTITYrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4]IDENTITY., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Product<&'a DMat4>`]::mulrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`Mul<Self>`]mul().(a, b)) |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1290 | #[inline] |
| 1291 | fn eqrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`PartialEq<Self>`]eq().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`PartialEq<Self>`]) -> bool { |
| 1292 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis..eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`PartialEq<Self>`]eq().(&rhs.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.) |
| 1293 | && self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis..eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`PartialEq<Self>`]eq().(&rhs.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.) |
| 1294 | && self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis..eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`PartialEq<Self>`]eq().(&rhs.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.) |
| 1295 | && self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis..eqrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4][`PartialEq<Self>`]eq().(&rhs.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.) |
| 1296 | } |
| 1297 | } |
| 1298 | |
| 1299 | #[cfg(not(target_arch = "spirv"))] |
| 1300 | impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[f64; 16]> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1301 | #[inline] |
| 1302 | fn as_refrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AsRef<[f64; 16]>`]as_ref().(&self) -> &[f64; 16] { |
| 1303 | unsafe { &*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(self as *const Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AsRef<[f64; 16]>`] as *const [f64; 16]) } |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | #[cfg(not(target_arch = "spirv"))] |
| 1308 | impl AsMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsMut#<[f64; 16]> for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1309 | #[inline] |
| 1310 | fn as_mutrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AsMut<[f64; 16]>`]as_mut().(&mut self) -> &mut [f64; 16] { |
| 1311 | unsafe { &mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(self as *mut Selfrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][`AsMut<[f64; 16]>`] as *mut [f64; 16]) } |
| 1312 | } |
| 1313 | } |
| 1314 | |
| 1315 | #[cfg(not(target_arch = "spirv"))] |
| 1316 | impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1317 | fn fmtrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Debug]fmt().(&self, fmt: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 1318 | fmt.debug_structrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_struct().(stringifyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/stringify!!(DMat4)) |
| 1319 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("x_axis", &self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis.) |
| 1320 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("y_axis", &self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis.) |
| 1321 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("z_axis", &self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis.) |
| 1322 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("w_axis", &self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis.) |
| 1323 | .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish().() |
| 1324 | } |
| 1325 | } |
| 1326 | |
| 1327 | #[cfg(not(target_arch = "spirv"))] |
| 1328 | impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for DMat4rust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4# { |
| 1329 | fn fmtrust-analyzer cargo glam 0.28.0 f64/dmat4/impl#[DMat4][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 1330 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(p) = f.precisionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]precision().() { |
| 1331 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!( |
| 1332 | f, |
| 1333 | "[{:.*}, {:.*}, {:.*}, {:.*}]", |
| 1334 | p, self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., p, self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., p, self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., p, self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis. |
| 1335 | ) |
| 1336 | } else { |
| 1337 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!( |
| 1338 | f, |
| 1339 | "[{}, {}, {}, {}]", |
| 1340 | self.x_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#x_axis., self.y_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#y_axis., self.z_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#z_axis., self.w_axisrust-analyzer cargo glam 0.28.0 f64/dmat4/DMat4#w_axis. |
| 1341 | ) |
| 1342 | } |
| 1343 | } |
| 1344 | } |