diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jtutil/util.hh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jtutil/util.hh b/src/jtutil/util.hh index 997c7a1..020584b 100644 --- a/src/jtutil/util.hh +++ b/src/jtutil/util.hh @@ -84,13 +84,14 @@ template <typename fp_t> void zero_C_array(int N, fp_t array[]); // -// more misc math stuff, valid only if <math.h> has been #included +// more misc math stuff, valid only if <math.h> has been #included; // -#ifdef PI // from "jt/stdc.h" - // floor/ceiling of double, returned as an int - inline int ifloor(double x) { return static_cast<int>(floor(x)); } - inline int iceil (double x) { return static_cast<int>(ceil (x)); } +// floor/ceiling of double, returned as an int +inline int ifloor(double x) { return static_cast<int>(floor(x)); } +inline int iceil (double x) { return static_cast<int>(ceil (x)); } +#ifdef PI /* PI is defined in "../include/stdc.h" */ + /* n.b. C-style comment needed for some preprocessors! */ // convert degrees <--> radians template <typename fp_t> inline fp_t degrees_of_radians(fp_t radians) { return (180.0/PI)*radians; } |