aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-07 19:40:53 +0100
committerDavid Robillard <d@drobilla.net>2020-03-07 19:59:15 +0100
commite5c80c7a473139c4416c0ede2d38b6fa2107435f (patch)
tree52552ee6e47029062531cc4b4710286f0b726c83
parent2daf7728a15f2ee0949ddb445816c9303155ce4a (diff)
Test: Fix cube rotation via mouse
-rw-r--r--test/pugl_test.c4
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);