diff options
Diffstat (limited to 'direction.h')
-rw-r--r-- | direction.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/direction.h b/direction.h index 33c465aac..fb99071f3 100644 --- a/direction.h +++ b/direction.h @@ -52,4 +52,10 @@ typedef enum Axis { AXIS_Y = 1 } Axis; + +static inline Axis DiagDirToAxis(DiagDirection d) +{ + return (Axis)(d & 1); +} + #endif |