diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-01-16 19:11:21 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-01-16 19:11:39 +0100 |
commit | ce217c33d2f588fa239a97a772296046888f0b80 (patch) | |
tree | 690b2ad6c038fbf2b090110f123a61ee3dabd1df | |
parent | 74c9709cfe4b131d31f204816451677fd3d0e4b0 (diff) |
logic/tracker: fix formula
Didn't return the canonical -180->180.
-rw-r--r-- | logic/tracker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp index cedb4459..95a60221 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -149,7 +149,7 @@ void Tracker::logic() const double x = value(i); if (fabs(x) - 1e-2 > 180) - value(i) = fmod(x - copysign(180, -x), 360) + copysign(180, x); + value(i) = fmod(x + copysign(180, x), 360) - copysign(180, x); else value(i) = clamp(x, -180, 180); } |