diff options
Diffstat (limited to 'src/rotation.hpp')
-rw-r--r-- | src/rotation.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rotation.hpp b/src/rotation.hpp new file mode 100644 index 00000000..39694336 --- /dev/null +++ b/src/rotation.hpp @@ -0,0 +1,14 @@ +#pragma once +#include <cstddef> + +namespace floormat { + +enum class rotation : unsigned char { + N, NE, E, SE, S, SW, W, NW, +}; + +constexpr inline std::size_t rotation_BITS = 3; +constexpr inline std::size_t rotation_MASK = (1 << rotation_BITS)-1; +constexpr inline rotation rotation_COUNT = rotation{1 << rotation_BITS}; + +} // namespace floormat |