Files
coopgo/node_modules/ol/vec/mat4.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

24 lines
719 B
JavaScript

/**
* @module ol/vec/mat4
*/
/**
* @return {Array<number>} "4x4 matrix representing a 3D identity transform."
*/
export function create() {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
/**
* @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.
* @param {import("../transform.js").Transform} transform Transformation matrix.
* @return {Array<number>} "2D transformation matrix as flattened 4x4 matrix."
*/
export function fromTransform(mat4, transform) {
mat4[0] = transform[0];
mat4[1] = transform[1];
mat4[4] = transform[2];
mat4[5] = transform[3];
mat4[12] = transform[4];
mat4[13] = transform[5];
return mat4;
}
//# sourceMappingURL=mat4.js.map