rotate_deg does not work correctly
lionkor opened this issue · comments
Lion commented
When rotating a vector, rotate_deg does not calculate correctly.
Example:
Vector2 (2, 5).rotated_deg (90)
should rotate vector (2, 5) by 90 degrees, which should return a vector (-5, 2) (correct example result).
It instead returns a vector (2, -5).
Using the latest version, you can reproduce it with this code:
std::cout << Vector2f (2, 5).rotated_deg (90) << std::endl;
Which will output x: 2 y: -5
, a wrong result.
This is reproducible with many different vectors and degrees.
Lines 364 to 371 in 17cdcf4