Fix rotation matrix detection

This commit is contained in:
Vanilagy
2025-01-02 17:03:05 +01:00
parent 5dda43959d
commit d476c42424
2 changed files with 9 additions and 7 deletions
+3 -3
View File
@@ -127,10 +127,10 @@ export class AsyncMutex {
}
}
export const rotationMatrix = (rotationInDegrees: number): TransformationMatrix => {
export const rotationMatrix = (rotationInDegrees: Rotation): TransformationMatrix => {
const theta = rotationInDegrees * (Math.PI / 180);
const cosTheta = Math.cos(theta);
const sinTheta = Math.sin(theta);
const cosTheta = Math.round(Math.cos(theta));
const sinTheta = Math.round(Math.sin(theta));
// Matrices are post-multiplied in ISOBMFF, meaning this is the transpose of your typical rotation matrix
return [