Companion

object Companion

The companion object of Matrix3.

Functions

Link copied to clipboard
@JvmStatic
fun fromFloatArray(array: FloatArray): Matrix3

Creates a new Matrix3 instance from a float array.

Link copied to clipboard
@JvmStatic
fun identity(): Matrix3

Gets the identity of the Matrix3 instance.

Link copied to clipboard
@JvmStatic
fun rotateByDegrees(angleInDegrees: Float): Matrix3

Creates and returns a 3x3 matrix representing a 2D rotation in the XY-plane (equivalent to a rotation around the Z-axis in a 3D context).

Link copied to clipboard
@JvmStatic
fun scale(x: Float, y: Float): Matrix3

Creates and returns a 3x3 scaling matrix for 2D scaling operations, with scaling factors applied along the X and Y axes. The Z-axis scaling factor is implicitly set to 1.0f.

Link copied to clipboard
@JvmStatic
fun translate(x: Float, y: Float): Matrix3

Creates and returns a 3x3 matrix representing a 2D translation by x along the X-axis and y along the Y-axis.