annotate ext/clapack/src/i_nint.c @ 456:05378924b433

Fix a rounding issue, returning key value 25 The two bins above center B minor are treated as 25. This patch shifts also the input chromagram by 2 to have center C on 1 like the profiles
author Daniel Schürmann <daschuer@mixxx.org>
date Sat, 11 May 2019 02:08:22 +0200
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