I’m looking for a way to change the matrix4 that I have rotated and get the rotation value back. here is my code snippet.
const degree = 240;
const matrix = new THREE.Matrix4();
const rotated = matrix.makeRotationZ(degree * (Math.PI / 180));
let vec = new THREE.Quaternion();
vec.setFromRotationMatrix(rotated);
const test2 = vec._w;
const test3 = 2 * Math.acos(test2);
const radToDegree = (test3 * 180) / Math.PI;
console.log(radToDegree);
Everything works fine. But got strange value when I convert at an angle of more than 240 degree.