diff options
author | David Robillard <d@drobilla.net> | 2020-03-07 19:40:53 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-07 19:59:15 +0100 |
commit | e5c80c7a473139c4416c0ede2d38b6fa2107435f (patch) | |
tree | 52552ee6e47029062531cc4b4710286f0b726c83 | |
parent | 2daf7728a15f2ee0949ddb445816c9303155ce4a (diff) | |
download | pugl-e5c80c7a473139c4416c0ede2d38b6fa2107435f.tar.gz pugl-e5c80c7a473139c4416c0ede2d38b6fa2107435f.tar.bz2 pugl-e5c80c7a473139c4416c0ede2d38b6fa2107435f.zip |
Test: Fix cube rotation via mouse
-rw-r--r-- | test/pugl_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/pugl_test.c b/test/pugl_test.c index 57b86cf..ba25757 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -266,8 +266,8 @@ onEvent(PuglView* view, const PuglEvent* event) onKeyPress(view, &event->key, "Child: "); break; case PUGL_MOTION_NOTIFY: - app->xAngle = fmod(app->xAngle - event->motion.x - app->lastMouseX, 360.0); - app->yAngle = fmod(app->yAngle + event->motion.y - app->lastMouseY, 360.0); + app->xAngle -= event->motion.x - app->lastMouseX; + app->yAngle += event->motion.y - app->lastMouseY; app->lastMouseX = event->motion.x; app->lastMouseY = event->motion.y; puglPostRedisplay(view); |