Mat3

data class Mat3<T : Number, Comparable<T>>(elements: List<T>, val type: KClass<T>) : BaseMat<T, Mat3<T>, Vec3<T>>

A 3×3 matrix.

Constructors

Link copied to clipboard
constructor(elements: List<T>, type: KClass<T>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun adj(): Mat3<T>

Returns an adjugate of this matrix.

Link copied to clipboard
open override fun det(): T

Returns a determinant of this matrix.

Link copied to clipboard
open operator override fun get(row: Int, col: Int): T

Returns element of this matrix at a given row and a given column.

Link copied to clipboard
open override fun inverse(): Mat3<T>

Returns an inverse of this matrix.

Link copied to clipboard
open operator override fun times(number: T): Mat3<T>

Multiplies this matrix by a given number.

open operator override fun times(other: Mat3<T>): Mat3<T>

Multiplies this matrix by the other matrix of the same size.

open operator override fun times(vector: Vec3<T>): Vec3<T>

Multiplies this matrix by a given vector.

Link copied to clipboard

Returns an array of elements of this matrix.

Link copied to clipboard

Returns a 3×3 double-precision float matrix equal to this matrix.

Link copied to clipboard

Returns an array of elements of this matrix.

Link copied to clipboard

Returns a 3×3 float matrix equal to this matrix.

Link copied to clipboard
open override fun toList(): List<T>

Returns a list of elements of this matrix.

Link copied to clipboard
fun toMat2(): Mat2<T>

Returns a 2×2 submatrix of this matrix, obtained by deleting the last row and the last column of this 4×4 matrix.

Link copied to clipboard
open override fun transpose(): Mat3<T>

Returns a transpose of this matrix.

Properties

Link copied to clipboard
open override val type: KClass<T>

Type of matrix elements.