enoughFrictionEnvelope: Compare with the absolute change of distance.

This commit is contained in:
asofold 2017-04-18 16:14:53 +02:00
parent 55715b0a9a
commit 6a4c75460a

View File

@ -167,7 +167,7 @@ public class Magic {
// TODO: Elaborate... could have one method to test them all?
final double frictDist = lastMove.yDistance * friction - minGravity;
final double off = Math.abs(thisMove.yDistance - frictDist);
return off <= maxOff && thisMove.yDistance - lastMove.yDistance <= off * decreaseByOff;
return off <= maxOff && Math.abs(thisMove.yDistance - lastMove.yDistance) <= off * decreaseByOff;
}
/**