From: Alexander Schmidt Date: Fri, 15 Jul 2016 12:20:03 +0000 (+0200) Subject: Formatting X-Git-Url: http://git.treefish.org/~alex/seamulator.git/commitdiff_plain/c3490f1ce9931b4050db4d4e0f044cf61285e2c6?ds=sidebyside Formatting --- diff --git a/seamulator.cpp b/seamulator.cpp index 92567f8..3d6a539 100644 --- a/seamulator.cpp +++ b/seamulator.cpp @@ -118,13 +118,15 @@ void glMouseFunc(int button, int state, int x, int y) void glMotionFunc(int x, int y) { - view.lookAlt = fmod(view.oldLookAlt + - (float)((y-view.fstMouseAngle[1])*2*M_PI/glutGet(GLUT_WINDOW_HEIGHT)), - (float)(2*M_PI)); - - view.lookAz = fmod(view.oldLookAz + - (float)((x-view.fstMouseAngle[0])*2*M_PI/glutGet(GLUT_WINDOW_WIDTH)), - (float)(2*M_PI)); + view.lookAlt = + fmod(view.oldLookAlt + + (float)((y-view.fstMouseAngle[1])*2*M_PI/glutGet(GLUT_WINDOW_HEIGHT)), + (float)(2*M_PI)); + + view.lookAz = + fmod(view.oldLookAz + + (float)((x-view.fstMouseAngle[0])*2*M_PI/glutGet(GLUT_WINDOW_WIDTH)), + (float)(2*M_PI)); updateView(); }