Commit 59382e47 authored by Nico Mack's avatar Nico Mack

Fixed bug in updateFromRotation method in multiTurn mode

parent 4db94d92
......@@ -242,7 +242,9 @@ public class ValueWidget extends TetherableWidget implements InformationProvider
} else if (multiTurn) {
if (!Double.isNaN(lastAngle)) {
value = variable.getValue();
double wrapped = AngleUtils.wrapTwoPi(angle) - AngleUtils.wrapTwoPi(lastAngle);
double wrapped = AngleUtils.wrapTwoPi(angle - lastAngle);
double degrees = Math.toDegrees(wrapped);
double delta = Math.abs(degrees * stepSize);
switch (direction) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment