We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa0d17 commit 2139048Copy full SHA for 2139048
spritetools.h
@@ -911,8 +911,11 @@ void st_camera_rotate(st_cam *pcam, float rot){
911
st_cam cam = *pcam;
912
cam.rot += rot;
913
//wraps rotation
914
- while(cam.rot > 1.0){
915
- cam.rot -= 1.0;
+ while(cam.rot > 2*3.14159265359){
+ cam.rot -= 2*3.14159265359;
916
+ }
917
+ while(cam.rot < 0){
918
+ cam.rot += 2*3.14159265359;
919
}
920
*pcam = cam;
921
@@ -925,6 +928,9 @@ void st_camera_rotate_set(st_cam *pcam, float rot){
925
928
while(cam.rot > 1.0){
926
929
cam.rot -= 1.0;
927
930
931
932
933
934
935
936
0 commit comments