add round() and M_PI support for windows builds
This commit is contained in:
parent
fa7efc9390
commit
9dbedacdda
1 changed files with 13 additions and 0 deletions
|
@ -166,8 +166,21 @@ inline int rint( double val)
|
|||
{
|
||||
return int(floor(val + 0.5));
|
||||
}
|
||||
|
||||
inline double round (double val)
|
||||
{
|
||||
return floor(val);
|
||||
}
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif //GLOBAL_HPP
|
||||
|
|
Loading…
Reference in a new issue