diff options
Diffstat (limited to 'tracker-test/test.cpp')
-rw-r--r-- | tracker-test/test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tracker-test/test.cpp b/tracker-test/test.cpp index 3e0db547..9ffdd366 100644 --- a/tracker-test/test.cpp +++ b/tracker-test/test.cpp @@ -56,17 +56,16 @@ void FTNoIR_Tracker::data(double *data) #endif for (int i = 0; i < 6; i++) { - double x = fmod(last_x[i] + incr[i] * d2r * dt, - 2 * pi); + double x = fmod(last_x[i] + incr[i] * d2r * dt, 2 * M_PI); last_x[i] = x; if (i >= 3) { #ifdef DISCONTINUITY if (x > pi + pi/2) - x -= pi; + x -= M_PI; else if (x > pi/2 && x < pi) - x += pi; + x += M_PI; #endif data[i] = sin(x) * 180; |