Included MorphOS patch

This commit is contained in:
llsth 2015-03-26 13:00:37 +01:00
parent 2ee6693905
commit 3ab236f0b0
1 changed files with 6 additions and 8 deletions

View File

@ -296,26 +296,24 @@ double log(double x);
#include <math.h> #include <math.h>
#endif #endif
static inline double double sgn(double x)
sgn(double x)
{ {
return x > 0.0 ? 1.0 : x < 0.0 ? -1.0 : 0.0; return x > 0.0 ? 1.0 : x < 0.0 ? -1.0 : 0.0;
} }
static inline double double trunc(double x)
trunc(double x)
{ {
return x > 0.0 ? floor(x) : ceil(x); return x > 0.0 ? floor(x) : ceil(x);
} }
#endif
static inline double double round(double x)
round(double x)
{ {
return x > 0.0 ? floor(x + 0.5) : ceil(x - 0.5); return x > 0.0 ? floor(x + 0.5) : ceil(x - 0.5);
} }
#endif
static inline double double log(double y, double x)
log(double y, double x)
{ {
return log(x)/log(y); return log(x)/log(y);
} }