@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
19 lines • 1.09 kB
TypeScript
/**
* Performs a polar decomposition of a 2x2 matrix.
* This function decomposes a 2x2 matrix `m` into two matrices, `R` and `S`,
* such that m = S * R, where:
* - R is a 2x2 orthogonal matrix (representing a rotation).
* - S is a 2x2 symmetric positive semi-definite matrix.
* The input matrix `m` and output matrices `R` and `S` are stored in a flattened,
* transposed format (consistent with the Taichi programming language convention).
*
* @param {number[]} R Output: 2x2 orthogonal matrix (rotation), stored as a flattened
* array [c, s, -s, c], where 'c' is the cosine and 's' is the sine of the rotation
* angle. Modified in-place.
* @param {number[]} S Output: 2x2 symmetric positive semi-definite matrix,
* stored as a flattened array. Modified in-place.
* @param {number[]} m Input: 2x2 matrix, stored as a flattened, *transposed* array [a, b, c, d],
* representing the matrix [[a, c], [b, d]]. Will be read from, but NOT modified.
*/
export function m2_polar_decomp(R: number[], S: number[], m: number[]): void;
//# sourceMappingURL=m2_polar_decomp.d.ts.map