Finding that Diagonal Movement Has Occured

I am trying to write a plugin that initiates a function when the player is moving at diagonal angles. Is there a built-in Boolean or other variable that could be used to see if the character has moved diagonally or is currently moving in a diagonal direction?
Nevermind. I found how to track it.

Original thread: https://forums.rpgmakerweb.com/threads/finding-that-diagonal-movement-has-occured.54638/