Return a 0 to 3 value indicating the four main directions (horizontal, upward diagonal, vertical, downward diagonal).
The x coordinate.
The y coordinate.
The direction as a 0 to 4 value.
Return a 0 to 3 value indicating the four main directions (horizontal, upward diagonal, vertical, downward diagonal).