Mercurial > hg > qm-dsp
annotate ext/clapack/src/i_nint.c @ 211:a41bea655151 msvc
Rename FFT back again, now we have our own project
author | Chris Cannam |
---|---|
date | Mon, 05 Feb 2018 17:40:13 +0000 |
parents | 45330e0d2819 |
children |
rev | line source |
---|---|
Chris@202 | 1 #include "f2c.h" |
Chris@202 | 2 |
Chris@202 | 3 #ifdef KR_headers |
Chris@202 | 4 double floor(); |
Chris@202 | 5 integer i_nint(x) real *x; |
Chris@202 | 6 #else |
Chris@202 | 7 #undef abs |
Chris@202 | 8 #include "math.h" |
Chris@202 | 9 #ifdef __cplusplus |
Chris@202 | 10 extern "C" { |
Chris@202 | 11 #endif |
Chris@202 | 12 integer i_nint(real *x) |
Chris@202 | 13 #endif |
Chris@202 | 14 { |
Chris@202 | 15 return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); |
Chris@202 | 16 } |
Chris@202 | 17 #ifdef __cplusplus |
Chris@202 | 18 } |
Chris@202 | 19 #endif |