NightFrost
Member
Modulo of negative numbers is calculated wrong (GMS1 has the same bug).
For example: -90 mod 360 gives me -90 when the correct answer is 270. Somewhat annoying as modulo can be used to create a looping range. I still have to do:
Instead of:
For example: -90 mod 360 gives me -90 when the correct answer is 270. Somewhat annoying as modulo can be used to create a looping range. I still have to do:
Code:
A = B + C;
if(A < 0) A += 360;
if(A > 359) A -= 360
Code:
A = (B + C) mod 360;