Open
Description
The 2d space rotation angle extraction function is below. Add this to matrix utils.
function angleFromTransform(transform: Readonly<Transform>): number {
try {
const [a, b, c] = transform[0];
const [d, e, f] = transform[1];
var angle = Math.round(Math.atan2(b, a) * (180 / Math.PI));
return angle < 0 ? angle + 360 : angle;
} catch (e) {
console.error(e);
return 0;
}
}
Metadata
Metadata
Assignees
Labels
No labels