From e5c80c7a473139c4416c0ede2d38b6fa2107435f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Mar 2020 19:40:53 +0100 Subject: Test: Fix cube rotation via mouse --- test/pugl_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/pugl_test.c') 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); -- cgit v1.2.1