9#include <sigc++/sigc++.h>
32#pragma warning(disable : 4244)
33#pragma warning(disable : 4800)
34#pragma warning(disable : 4355)
35#pragma warning(disable : 4351)
39#define strncasecmp _strnicmp
40#define strcasecmp _stricmp
44#define SIZET_FMT "%zu"
60#include "profiler/Profiler.h"
63#define PiVerify(x) ((void)(x))
65#define PiVerify(x) assert(x)
69inline const T &
Clamp(
const T &x,
const T &min,
const T &max) {
return x > max ? max : (x < min ? min : x); }
71inline constexpr double DEG2RAD(
double x) {
return x * (M_PI / 180.); }
72inline constexpr float DEG2RAD(
float x) {
return x * (float(M_PI) / 180.f); }
73inline constexpr double RAD2DEG(
double x) {
return x * (180. / M_PI); }
74inline constexpr float RAD2DEG(
float x) {
return x * (180.f / float(M_PI)); }
78template <
typename T,
size_t N>
80#define COUNTOF(array) (sizeof(COUNTOF_Helper(array)))
char(& COUNTOF_Helper(T(&array)[N]))[N]
constexpr double DEG2RAD(double x)
Definition libs.h:71
const T & Clamp(const T &x, const T &min, const T &max)
Definition libs.h:69
constexpr double RAD2DEG(double x)
Definition libs.h:73