Mercurial > hg > qm-dsp
annotate ext/clapack/src/i_nint.c @ 475:64fc3009d0a3
Switch from DOS to Unix line-endings
| author | Chris Cannam <cannam@all-day-breakfast.com> |
|---|---|
| date | Thu, 30 May 2019 18:28:11 +0100 |
| parents | 905e45637745 |
| children |
| rev | line source |
|---|---|
| c@427 | 1 #include "f2c.h" |
| c@427 | 2 |
| c@427 | 3 #ifdef KR_headers |
| c@427 | 4 double floor(); |
| c@427 | 5 integer i_nint(x) real *x; |
| c@427 | 6 #else |
| c@427 | 7 #undef abs |
| c@427 | 8 #include "math.h" |
| c@427 | 9 #ifdef __cplusplus |
| c@427 | 10 extern "C" { |
| c@427 | 11 #endif |
| c@427 | 12 integer i_nint(real *x) |
| c@427 | 13 #endif |
| c@427 | 14 { |
| c@427 | 15 return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); |
| c@427 | 16 } |
| c@427 | 17 #ifdef __cplusplus |
| c@427 | 18 } |
| c@427 | 19 #endif |
