Mat2

data class Mat2(elements: List<Float>) : BaseMat<Mat2, Vec2>

A 2×2 matrix.

Constructors

Mat2
Link copied to clipboard
common
fun Mat2(elements: List<Float>)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

adj
Link copied to clipboard
common
open override fun adj(): Mat2
Returns an adjugate of this matrix.
det
Link copied to clipboard
common
open override fun det(): Float
Returns a determinant of this matrix.
get
Link copied to clipboard
common
open operator override fun get(row: Int, col: Int): Float
Returns element of this matrix at a given row and a given column.
inverse
Link copied to clipboard
common
open override fun inverse(): Mat2
Returns an inverse of this matrix.
times
Link copied to clipboard
common
open operator override fun times(other: Mat2): Mat2
Multiplies this matrix by the other matrix of the same size.
open operator override fun times(vector: Vec2): Vec2
Multiplies this matrix by a given vector.
open operator override fun times(number: Float): Mat2
Multiplies this matrix by a given number.
toFloatArray
Link copied to clipboard
common
open override fun toFloatArray(): FloatArray
Returns an array of elements of this matrix.
toString
Link copied to clipboard
common
open override fun toString(): String
Returns a string representation of this matrix.
transpose
Link copied to clipboard
common
open override fun transpose(): Mat2
Returns a transpose of this matrix.