Move source code into source subfolder
This commit is contained in:
parent
870f459f75
commit
d0d3834449
23 changed files with 0 additions and 0 deletions
source/maths
28
source/maths/mathtypes.h
Normal file
28
source/maths/mathtypes.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef _BASETYPES_H_
|
||||
#define _BASETYPES_H_
|
||||
|
||||
#include <limits> // std::numeric_limits
|
||||
|
||||
#include "stdlib.h" // for size_t
|
||||
|
||||
template<class T, size_t N>
|
||||
constexpr size_t _countof(T (&)[N]) { return N; }
|
||||
|
||||
// Coordinate types
|
||||
typedef short coord_t;
|
||||
typedef unsigned short ucoord_t;
|
||||
|
||||
// Invalid values
|
||||
static const coord_t coord_invalid = std::numeric_limits<coord_t>::max();
|
||||
static const ucoord_t ucoord_invalid = std::numeric_limits<ucoord_t>::max();
|
||||
|
||||
// Direction representation
|
||||
enum class dir_t : char
|
||||
{
|
||||
N = 'N',
|
||||
S = 'S',
|
||||
E = 'E',
|
||||
W = 'W'
|
||||
};
|
||||
|
||||
#endif //_BASETYPES_H_
|
Loading…
Add table
Add a link
Reference in a new issue