[libgdx] Move a assignment closer to use.

This commit is contained in:
Nathan Sweet 2025-06-06 19:16:48 -04:00
parent ffb0f790f5
commit e6f85fb9d1

View File

@ -171,7 +171,6 @@ public class PhysicsConstraint extends Constraint<PhysicsConstraint, PhysicsCons
dy = qy;
else if (dy < -qy) //
dy = -qy;
a = remaining;
if (rotateOrShearX) {
mr = (data.rotate + data.shearX) * mix;
z = rotateLag * Math.max(0, 1 - aa / t);
@ -190,6 +189,7 @@ public class PhysicsConstraint extends Constraint<PhysicsConstraint, PhysicsCons
float r = l * bone.getWorldScaleX() - scaleLag * Math.max(0, 1 - aa / t);
if (r > 0) scaleOffset += (dx * c + dy * s) * i / r;
}
a = remaining;
if (a >= t) {
if (d == -1) {
d = (float)Math.pow(p.damping, 60 * t);