default
tkmath
tkmathtkmath.Matrix2fadd(Matrix2f m) - Add another matrix m to this instance
det() : float - Calculate determinant of matrix
getA() : float - Get value of a element
getAbs() : float - Calculate the Hilbert-Schmidt norm of the matrix
getAbsSqr() : float - Calculate the squared Hilbert-Schmidt norm of the matrix
getB() : float - Get value of b element
getC() : float - Get value of c element
getCol(int col) : Vector2f - Get column 'col' vector
getD() : float - Get value of d element
getRow(int row) : Vector2f - Get row 'row' vector
getString() : String - Get string representation of matrix ((a, b), (c, d))
init(float a, b, c, d) - Initialize matrix (in matrix order, default=row-major)
initColf(int col, float a, b) - Initialize matrix column from scalars
initColumnMajor(float a, b, c, d) - Initialize matrix (column-major arg order. swap args if matrix is in (default) row-major order).
initColv(int col, Vector2f v) - Initialise matrix column from vector or array-like object
initIdentity() - Initialize with identity matrix.
initRotatef() -
initRowf(int row, float a, b) - Initialize matrix row from scalars
initRowMajor(float a, b, c, d) - Initialize matrix (row-major arg order. swap args if matrix is in (non-default) column-major order).
initRowV(int row, Vector2f v) - Initialize matrix row from vector or array-like object
initScalef() -
initScalev() -
initSkewXf() - a in radians (0..2PI)
initSkewYf() - a in radians (0..2PI)
initTranspose(float a, b, c, d) - Initialize matrix (swap arg row/column order).
invert() - Calculate inversion of matrix, so that A*A-1=U
isIdentity() - Check if this is an identity matrix (diagonal=1, other=0)
mul(Matrix2f m) - Multiply this instance by matrix m (this * m)
mulf(float v) - Multiply this instance by scalar value v
mulRev(Matrix2f m) - Reverse-multiply matrix m by this instance (m * this)
mulv(Vector2f v) : Vector2f - Multiply this instance by a 2dim vector
New(float va, vb, vc, vd) : Matrix2f - Initialize and return new instance of Matrix2f (args are in row-major order)
rotatef(float ang) - Multiply by rotation matrix (angle is in radiant measure)
scalef(float x, y, z) - Multiply by scale matrix
scalev(Vector2f v) - Multiply by scale matrix
setA(float v) - Set a element to v
setB(float v) - Set b element to v
setC(float v) - Set c element to v
setCol(int col, Vector2f v) - Initialize column 'col' with values from 'v'
setD(float v) - Set d element to v
setRow(int row, Vector2f v) - Initialize row 'row' with values from 'v'
sub(Matrix2f m) - Substract another matrix m from this instance
transpose() - Transpose matrix
unit() - Normalize matrix using Hilbert-Schmidt norm
unitScale(float s) - Normalise matrix using Hilbert-Schmidt norm and multiply by 's' afterwards
The default layout is row-major. 0 1 = a b 2 3 c d
Method add | |||||
Add another matrix m to this instance | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method det | |||||
Calculate determinant of matrix | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getA | |||||
Get value of a element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getAbs | |||||
Calculate the Hilbert-Schmidt norm of the matrix | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getAbsSqr | |||||
Calculate the squared Hilbert-Schmidt norm of the matrix | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getB | |||||
Get value of b element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getC | |||||
Get value of c element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getCol | ||||||||||
Get column 'col' vector | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
| ||||||||||
Method getD | |||||
Get value of d element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getRow | ||||||||||
Get row 'row' vector | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
| ||||||||||
Method getString | |||||
Get string representation of matrix ((a, b), (c, d)) | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method init | |||||||||||||||||||||||||
Initialize matrix (in matrix order, default=row-major) | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method initColf | ||||||||||||||||||||
Initialize matrix column from scalars | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method initColumnMajor | |||||||||||||||||||||||||
Initialize matrix (column-major arg order. swap args if matrix is in (default) row-major order). | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method initColv | |||||||||||||||
Initialise matrix column from vector or array-like object | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method initIdentity | |||
Initialize with identity matrix. | |||
Signature | |||
|
Method initRotatef | |||
Signature | |||
|
Method initRowf | ||||||||||||||||||||
Initialize matrix row from scalars | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method initRowMajor | |||||||||||||||||||||||||
Initialize matrix (row-major arg order. swap args if matrix is in (non-default) column-major order). | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method initRowV | |||||||||||||||
Initialize matrix row from vector or array-like object | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method initScalef | |||
Signature | |||
|
Method initScalev | |||
Signature | |||
|
Method initSkewXf | |||
a in radians (0..2PI) | |||
Signature | |||
| |||
Description | |||
see https://www.w3.org/TR/css-transforms-1/#SkewXDefined |
Method initSkewYf | |||
a in radians (0..2PI) | |||
Signature | |||
|
Method initTranspose | |||||||||||||||||||||||||
Initialize matrix (swap arg row/column order). | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method invert | |||
Calculate inversion of matrix, so that A*A-1=U | |||
Signature | |||
|
Method isIdentity | |||
Check if this is an identity matrix (diagonal=1, other=0) | |||
Signature | |||
|
Method mul | |||||
Multiply this instance by matrix m (this * m) | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mulf | |||||
Multiply this instance by scalar value v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mulRev | |||||
Reverse-multiply matrix m by this instance (m * this) | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mulv | ||||
Multiply this instance by a 2dim vector | ||||
Signature | ||||
Arguments | ||||
| ||||
Returns | ||||
|
Method New | ||||||||||||||||||||||||||||||
Initialize and return new instance of Matrix2f (args are in row-major order) | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Method rotatef | |||||
Multiply by rotation matrix (angle is in radiant measure) | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method scalef | ||||||||||||||||||||
Multiply by scale matrix | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method setA | |||||
Set a element to v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setB | |||||
Set b element to v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setC | |||||
Set c element to v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setCol | |||||||||||||||
Initialize column 'col' with values from 'v' | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method setD | |||||
Set d element to v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setRow | |||||||||||||||
Initialize row 'row' with values from 'v' | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method sub | |||||
Substract another matrix m from this instance | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method transpose | |||
Transpose matrix | |||
Signature | |||
|
Method unit | |||
Normalize matrix using Hilbert-Schmidt norm | |||
Signature | |||
|
Method unitScale | |||||
Normalise matrix using Hilbert-Schmidt norm and multiply by 's' afterwards | |||||
Signature | |||||
| |||||
Arguments | |||||
|
auto-generated by "DOG", the TkScript document generator. Thu, 11/Dec/2025 13:41:59