MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Matrix_math_for_the_web
What specific section or headline is this issue about?
Rotation matrix
What information was incorrect, unhelpful, or incomplete?
const transformedPoint = [
Math.cos(rotationInRadians) * distance,
Math.sin(rotationInRadians) * distance,
];
The code above calculating transformed point misses the original point angle.
What did you expect to see?
In this case, the original point angle should be preserved.
const originalAngleInRadians = Math.atan2(point[1], point[0]);
const transformedPoint = [
Math.cos(originalAngleInRadians + rotationInRadians) * distance,
Math.sin(originalAngleInRadians + rotationInRadians) * distance,
];
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Matrix_math_for_the_web
What specific section or headline is this issue about?
Rotation matrix
What information was incorrect, unhelpful, or incomplete?
The code above calculating transformed point misses the original point angle.
What did you expect to see?
In this case, the original point angle should be preserved.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/webgl_api/matrix_math_for_the_web