Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //fixrot( rotation ); <-- version 2
- if ( argument0 >= 0 ) {
- return argument0 mod 360;
- } else {
- return 360 + ( argument0 mod -360 );
- }
- //fixrot( rotation ); <-- version 1;
- var fix = argument0;
- while( fix >= 360 || fix < 0 ) {
- fix += ( ( fix < 0 ) * 360 ) + ( ( fix >= 360 ) * -360 );
- };
- return fix;
- // ... module makes a HUGE difference...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement