equals

fun equals(left: Matrix4? = definedExternally, right: Matrix4? = definedExternally): Boolean(source)

Compares the provided matrices componentwise and returns true if they are equal, false otherwise.

//compares two Matrix4 instances

// a = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]

// b = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]

if(Matrix4.equals(a,b)) {
console.log("Both matrices are equal");
} else {
console.log("They are not equal");
}

//Prints "Both matrices are equal" on the console

Return

true if left and right are equal, false otherwise.

Parameters

left

The first matrix.

right

The second matrix.

See also