Hi there,
The code as it is currently written can only be used to check Left vs Right or Up vs Down.
In order to differentiate between a Left and an Up motion, one would need to also check the difference in the x-axis vs the y-axis: Is the difference in the x-axis bigger then we are looking at a Left vs Right direction, otherwise it's an Up vs Down direction.
The fix would be quite easy, but because you have not exposed your inner functions, one can not extend your current implementation to allow this behaviour.
Hi there,
The code as it is currently written can only be used to check Left vs Right or Up vs Down.
In order to differentiate between a Left and an Up motion, one would need to also check the difference in the x-axis vs the y-axis: Is the difference in the x-axis bigger then we are looking at a Left vs Right direction, otherwise it's an Up vs Down direction.
The fix would be quite easy, but because you have not exposed your inner functions, one can not extend your current implementation to allow this behaviour.