servo: DOMMatrix rotate() gives wrong value
new DOMMatrix().rotate(90, 0, 0);
// Gives
// [ 1, 0, 0, 0,
// 0, 0, -1, 0,
// 0, 1, 0, 0,
// 0, 0, 0, 1]
// ... while the expected value is:
// [ 1, 0, 0, 0,
// 0, 0, 1, 0,
// 0, -1, 0, 0,
// 0, 0, 0, 1]
Relevant code:
Could this be a euclid bug, as it seems it internally uses 3D rotation matrix designed for column-major matrices while being row-major?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (16 by maintainers)
Yeah, looking closely it looks like that function in euclid was written with column vectors in mind.
What a mess.
Temporary fix would be to transpose the output of euclid.