AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
The implementation of rotate2d is clockwise and does not match the spec
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 451
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
The implementation code of rotate2d is as follows:
void mx_rotate_vector2(vec2 _in, float amount, out vec2 result)
{
float rotationRadians = radians(amount);
float sa = sin(rotationRadians);
float ca = cos(rotationRadians);
result = vec2(ca*_in.x + sa*_in.y, -sa*_in.x + ca*_in.y);
}
the rotate is clockwise, bug specs are as follows:
the amount to rotate, specified in degrees, with positive values rotating the
incoming vector counterclockwise
Contributor guide
Research direction
Start by locating the rotate2d implementation and the mx_rotate_vector2 entry point shown in the issue. Compare its direction with the stated specification for positive counterclockwise rotation, then verify that the implementation and any relevant rotation behavior match the spec.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100