Debian Codegraph @

debian/missing-sources/glam-0.23.0/src/f64/dmat4.rs

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