Skip to main content

m2_polar_decomp_noS

m2_polar_decomp_noS(R, m)

Performs a polar decomposition of a 2x2 matrix, returning only the rotation matrix (R). This function is optimized for speed and assumes the input matrix m is stored in a flattened, transposed format (consistent with the Taichi programming language convention). It decomposes m into R, such that m = R * S, where R is a 2x2 rotation matrix. The symmetric matrix S is not computed. This version is optimized for cases where only the rotational component (R) is needed.

Kind: global function

ParamTypeDescription
RArray.<number>Output: 2x2 rotation matrix, 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.
mArray.<number>Input: 2x2 matrix, stored as a flattened, transposed array [a, b, c, d], representing the matrix [[a, c], [b, d]].