blob: a03a8880cd4d11b4385a8180bcfa1b4318bb2ea3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/**
* @file common.hpp
* @brief Common things needed by all files, in theory.
*/
#ifndef COMMON_HPP_
#define COMMON_HPP_
#include <algorithm>
#include <cctype>
// windows stuff
#ifdef __WIN32__
using uint = unsigned int;
#undef near
#endif
// defines pi for calculations that need it.
constexpr float PI = 3.1415926535f;
/**
* Gets millisecond count since epoch.
* @return number of milliseconds
*/
unsigned int millis(void);
/*namespace std {
template<class T>
constexpr const T& clamp(const T& v, const T& lo, const T& hi) {
return (v > hi) ? hi : ((v > lo) ? v : lo);
}
}*/
#endif // COMMON_HPP_
|