Fix OnSwipe

Correction of determining the direction of UP-LEFT.
Wrong 9 degrees =)
This commit is contained in:
E1e5en 2020-12-01 21:18:12 +03:00
parent dc19715571
commit 1867975099

View file

@ -120,8 +120,8 @@ class OnSwipeNode extends LogicNode {
switch (from) { switch (from) {
// UP // UP
case 1: { case 1: {
// 68 - 121 // 68 - 112
if ((angle >= 68) && (angle < 121)) return true; if ((angle >= 68) && (angle < 112)) return true;
return false; return false;
} }
// DOWN // DOWN
@ -144,8 +144,8 @@ class OnSwipeNode extends LogicNode {
} }
// UP-LEFT // UP-LEFT
case 5: { case 5: {
// 121 - 158 // 112 - 158
if ((angle >= 121) && (angle < 158)) return true; if ((angle >= 112) && (angle < 158)) return true;
return false; return false;
} }
// UP-RIGHT // UP-RIGHT