Import std.math.matrix
Mat3
struct
Public Struct Mat3 Implements Equatable, Printable
A 3 by 3 matrix: a rotation, a scale, or both, of 3D vectors.
Examples
Local stretch = Mat3.Scale(Vec3(2, 3, 4))
Expect(Determinant(stretch) == 24.0)
Expect(stretch * Vec3(1, 1, 1) == Vec3(2, 3, 4))
Expect(IsClose(Inverse(stretch) * stretch, Mat3.Identity))-
Its first column.
-
Its second column.
-
Its third column.
-
The matrix that changes nothing.
-
The matrix that scales each axis by the vector's component.
-
The
rotation's matrix. -
The rotation by the
angle, in radians, about the X axis. -
The rotation by the
angle, in radians, about the Y axis. -
The rotation by the
angle, in radians, about the Z axis. -
The matrix as a Mat4 that moves nothing.
-
Its columns, as "((1, 0, 0), (0, 1, 0), (0, 0, 1))".
-
The element in a column and a row, each from 0 to 2. Any other panics.
-
The transform by
b, then bya. -
The vector transformed.
-
mtimesscale. -
scaletimesm. -
mdivided byscale. -
aplusb. -
aminusb.
Report an issue with this page or with FutureBlitz on GitHub.