diff --git a/examples/examples_template.c b/examples/examples_template.c index 3d8332e6..2b962d31 100644 --- a/examples/examples_template.c +++ b/examples/examples_template.c @@ -41,7 +41,7 @@ * * raylib [core] example - Basic window * -* Example originally created with raylib 4.2, last time updated with raylib 4.2 +* Example originally created with raylib 4.5, last time updated with raylib 4.5 * * Example contributed by (@) and reviewed by Ramon Santamaria (@raysan5) * diff --git a/src/rgestures.h b/src/rgestures.h index 1461a111..35cd7a60 100644 --- a/src/rgestures.h +++ b/src/rgestures.h @@ -311,10 +311,10 @@ void ProcessGestureEvent(GestureEvent event) // NOTE: Angle should be inverted in Y GESTURES.Drag.angle = 360.0f - rgVector2Angle(GESTURES.Touch.downPositionA, GESTURES.Touch.upPosition); - if ((GESTURES.Drag.angle < 30) || (GESTURES.Drag.angle > 330)) GESTURES.current = GESTURE_SWIPE_RIGHT; // Right - else if ((GESTURES.Drag.angle > 30) && (GESTURES.Drag.angle < 120)) GESTURES.current = GESTURE_SWIPE_UP; // Up - else if ((GESTURES.Drag.angle > 120) && (GESTURES.Drag.angle < 210)) GESTURES.current = GESTURE_SWIPE_LEFT; // Left - else if ((GESTURES.Drag.angle > 210) && (GESTURES.Drag.angle < 300)) GESTURES.current = GESTURE_SWIPE_DOWN; // Down + if ((GESTURES.Drag.angle < 30) || (GESTURES.Drag.angle > 330)) GESTURES.current = GESTURE_SWIPE_RIGHT; // Right + else if ((GESTURES.Drag.angle >= 30) && (GESTURES.Drag.angle <= 150)) GESTURES.current = GESTURE_SWIPE_UP; // Up + else if ((GESTURES.Drag.angle > 150) && (GESTURES.Drag.angle < 210)) GESTURES.current = GESTURE_SWIPE_LEFT; // Left + else if ((GESTURES.Drag.angle >= 210) && (GESTURES.Drag.angle <= 330)) GESTURES.current = GESTURE_SWIPE_DOWN; // Down else GESTURES.current = GESTURE_NONE; } else