toArray
fun toArray(matrix: Matrix4, result: ReadonlyArray<Double>? = definedExternally): ReadonlyArray<Double>(source)
Computes an Array from the provided Matrix4 instance. The array will be in column-major order.
//create an array from an instance of Matrix4
// m = [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]
const a = Matrix4.toArray(m);
// m remains the same
//creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0]
Content copied to clipboard
Return
The modified Array parameter or a new Array instance if one was not provided.
Parameters
matrix
The matrix to use..
result
The Array onto which to store the result.