diff options
Diffstat (limited to 'src/direction.h')
| -rw-r--r-- | src/direction.h | 4 |
1 files changed, 4 insertions, 0 deletions
| diff --git a/src/direction.h b/src/direction.h index 325bcaf..86eb31f 100644 --- a/src/direction.h +++ b/src/direction.h | |||
| @@ -120,4 +120,8 @@ inline Direction cardinalDirectionFacingPoint(vec2i point) { | |||
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | inline bool isCardinalDirection(Direction dir) { | ||
| 124 | return (dir == Direction::left || dir == Direction::right || dir == Direction::up || dir == Direction::down); | ||
| 125 | } | ||
| 126 | |||
| 123 | #endif /* end of include guard: DIRECTION_H_AB66A90E */ | 127 | #endif /* end of include guard: DIRECTION_H_AB66A90E */ |
