23#define MSGRETURN(x) { qDebug() << x; return; }
24#define WARNINGRETURN(x) { qWarning() << x; return; }
25#define ERRORRETURN(x) { qError() << x; return; }
27#define RAD(x) (x*M_PI/180.)
28#define GRAD(x) (x/M_PI*180.)
38void dbg_helper(
const char *where,
const char *what,
const char* file,
int line);
39void dbg_helper_ext(
const char *where,
const char *what,
const char* file,
int line,
const QString &s);
50# define DBG_IF(cond, where, what) ((cond) ? dbg_helper(where, what, __FILE__, __LINE__) : qt_noop())
52# define DBG_IF(cond, where, what) qt_noop()
58# define DBG_IF_X(cond, where, what,more) ((cond) ? dbg_helper_ext(where, what, __FILE__, __LINE__,more) : qt_noop())
60# define DBG_IF_X(cond, where, what,more) qt_noop()
66# define DBGMODE(stmts) { stmts }
68# define DBGMODE(stmts) qt_noop()
82inline double limit(
const double value,
const double lower,
const double upper)
84 return qMax(qMin(value, upper), lower);
86inline int limit(
const int value,
const int lower,
const int upper)
88 return qMax(qMin(value, upper), lower);
90inline void setBit(
unsigned int &rTarget,
const int bit,
const bool value)
93 rTarget |= (1 << bit);
95 rTarget &= ( (1 << bit) ^ 0xffffff );
97inline bool isBitSet(
const unsigned int value,
const int bit)
99 return value & (1 << bit);
104#define isnan(x) ((x) != (x))
107#include "globalsettings.h"
bool logLevelInfo()
Definition: main.cpp:21
bool isBitSet(const unsigned int value, const int bit)
Definition: global.h:97
void dbg_helper(const char *where, const char *what, const char *file, int line)
Definition: globalsettings.cpp:91
bool logLevelWarning()
Definition: main.cpp:27
void setBit(unsigned int &rTarget, const int bit, const bool value)
Definition: global.h:90
void dbg_helper_ext(const char *where, const char *what, const char *file, int line, const QString &s)
Definition: globalsettings.cpp:95
bool logLevelDebug()
Definition: main.cpp:15
double limit(const double value, const double lower, const double upper)
Definition: global.h:82
void setLogLevel(int loglevel)
Definition: main.cpp:31