Skip to main content

Matrix3x3f

APJS Script API reference for the Matrix3x3f class.

TypeNameInterface Description
Variablescolumn0: Vector3f

Function: The first column of the matrix.

Variablescolumn1: Vector3f

Function: The second column of the matrix.

Variablescolumn2: Vector3f

Function: The third column of the matrix.

Functionsconstructor()

Functionsconstructor(m0?: number, m1?: number, m2?: number, m3?: number, m4?: number, m5?: number, m6?: number, m7?: number, m8?: number)

Parameters

m0: - The value at position (0,0).

m1: - The value at position (0,1).

m2: - The value at position (0,2).

m3: - The value at position (1,0).

m4: - The value at position (1,1).

m5: - The value at position (1,2).

m6: - The value at position (2,0).

m7: - The value at position (2,1).

m8: - The value at position (2,2).

Functionsadd(other: Matrix3x3f): this

Function: Adds the specified matrix to this matrix and returns the result.

Parameters

other: - The matrix to add to this matrix.

Returns This matrix after addition.

Functionsclone(): Matrix3x3f

Function: Returns a clone of the current Matrix3x3f instance.

Returns A new Matrix3x3f object with the same data as the original.

Functionsdivide(other: Matrix3x3f): this

Function: Divides each element of the current matrix by the corresponding element of another matrix.

Parameters

other: - The matrix to divide by.

Returns This matrix after performing the division.

Functionsequals(other: Matrix3x3f): boolean

Function: Compares this matrix with another matrix for equality. This method performs a direct value comparison of the elements in both matrices.

Parameters

other: - The Matrix3x3f object to compare with this matrix.

Returns A boolean indicating whether the two matrices are equal.

Functionsget(row: number, column: number): number

Function: Retrieves the value at the specified row and column in the 3x3 matrix.

Parameters

row: - The row index (0-based) of the element to retrieve.

column: - The column index (0-based) of the element to retrieve.

Returns The value at the specified row and column.

Functionsinverse(): this

Function: Returns the inverse of the matrix.

Returns The current instance with its values set to the inverse of the original matrix.

Functionsmultiply(other: Matrix3x3f | number): this

Function: Multiplies the current matrix by another matrix or a scalar.

Parameters

other: - The matrix or scalar to multiply with.

Returns The modified instance of the current matrix after multiplication.

FunctionsmultiplyScalar(scalar: number): this

Function: Multiplies each element of the matrix by a given scalar.

Parameters

scalar: - The scalar value to multiply with each element of the matrix.

Returns This instance of Matrix3x3f after performing the scalar multiplication.

Functionsset(row: number, column: number, value: number): this

Function: Sets the value at a specified row and column in the matrix.

Parameters

row: - The row index (0-based).

column: - The column index (0-based).

value: - The value to set at the specified position.

Returns This instance of Matrix3x3f for method chaining.

Functionssubtract(other: Matrix3x3f): this

Function: Returns the result of subtracting another 3x3 matrix from this matrix.

Parameters

other: - The matrix to be subtracted from this matrix.

Returns This matrix after performing the subtraction.

FunctionstoString(): string

Function: Returns a string representation of the Matrix3x3f, with each element formatted to five decimal places.

Returns The string representation of the matrix.

Functionstranspose(): this

Function: Returns the transpose of this matrix.

Returns The transposed matrix.

Examples

constructor()

let obj = new APJS.Matrix3x3f();

constructor(m0?: number, m1?: number, m2?: number, m3?: number, m4?: number, m5?: number, m6?: number, m7?: number, m8?: number)

let obj = new APJS.Matrix3x3f();

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use Matrix3x3f here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies