Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/raysan5/raylib
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jul 5, 2023
2 parents 58bd10e + 13a26a0 commit 4f9235f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/examples_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <user_name> (@<user_github>) and reviewed by Ramon Santamaria (@raysan5)
*
Expand Down
8 changes: 4 additions & 4 deletions src/rgestures.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f9235f

Please sign in to comment.