Script to check if Player is facing a diagonal direction?

So to my understanding, in MV, the directions are:


8=up,
6=right,
4=left,
2=down

So like I can check for a direction facing using script:
Code:
$gamePlayer.direction()==2



I am using Galv's diagonal sprites, and I was wondering if there was a way to use a script call in the conditional branch just to check if the player is facing any diagonal direction.
Can someone please clarify how I'd do this? Is it just all the odd values numbers?
I haven't used that plugin, but from peeking at the code it does seem to be the case. Here's the lookup table it uses:
1698261206596.png

Direction 1 means going 4 (left) and 2(down) etc.
So yes, you can test for diagonality with $gamePlayer.direction() % 2 === 1

Original thread: https://forums.rpgmakerweb.com/threads/script-to-check-if-player-is-facing-a-diagonal-direction.162390/