diff --git a/spine-c/spine-c/src/spine/TransformConstraint.c b/spine-c/spine-c/src/spine/TransformConstraint.c index 188d53e2f..75bf6c8a9 100644 --- a/spine-c/spine-c/src/spine/TransformConstraint.c +++ b/spine-c/spine-c/src/spine/TransformConstraint.c @@ -205,13 +205,13 @@ void _spTransformConstraint_applyAbsoluteLocal (spTransformConstraint* self) { } scaleX = bone->ascaleX, scaleY = bone->ascaleY; - if (scaleMix > 0) { + if (scaleMix != 0) { if (scaleX > 0.00001) scaleX = (scaleX + (target->ascaleX - scaleX + self->data->offsetScaleX) * scaleMix) / scaleX; if (scaleY > 0.00001) scaleY = (scaleY + (target->ascaleY - scaleY + self->data->offsetScaleY) * scaleMix) / scaleY; } shearY = bone->ashearY; - if (shearMix > 0) { + if (shearMix != 0) { r = target->ashearY - shearY + self->data->offsetShearY; r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360; bone->shearY += r * shearMix; @@ -245,13 +245,13 @@ void _spTransformConstraint_applyRelativeLocal (spTransformConstraint* self) { scaleX = bone->ascaleX; scaleY = bone->ascaleY; - if (scaleMix > 0) { + if (scaleMix != 0) { if (scaleX > 0.00001f) scaleX *= ((target->ascaleX - 1 + self->data->offsetScaleX) * scaleMix) + 1; if (scaleY > 0.00001f) scaleY *= ((target->ascaleY - 1 + self->data->offsetScaleY) * scaleMix) + 1; } shearY = bone->ashearY; - if (shearMix > 0) shearY += (target->ashearY + self->data->offsetShearY) * shearMix; + if (shearMix != 0) shearY += (target->ashearY + self->data->offsetShearY) * shearMix; spBone_updateWorldTransformWith(bone, x, y, rotation, scaleX, scaleY, bone->ashearX, shearY); } diff --git a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp index 28bb5fc26..0cc82bfc6 100644 --- a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp @@ -315,7 +315,7 @@ void TransformConstraint::applyAbsoluteLocal() { } float scaleX = bone._ascaleX, scaleY = bone._ascaleY; - if (scaleMix > 0) { + if (scaleMix != 0) { if (scaleX > 0.00001f) { scaleX = (scaleX + (target._ascaleX - scaleX + _data._offsetScaleX) * scaleMix) / scaleX; } @@ -326,7 +326,7 @@ void TransformConstraint::applyAbsoluteLocal() { } float shearY = bone._ashearY; - if (shearMix > 0) { + if (shearMix != 0) { float r = target._ashearY - shearY + _data._offsetShearY; r -= (16384 - (int) (16384.499999999996 - r / 360)) * 360; bone._shearY += r * shearMix; @@ -363,7 +363,7 @@ void TransformConstraint::applyRelativeLocal() { } float scaleX = bone._ascaleX, scaleY = bone._ascaleY; - if (scaleMix > 0) { + if (scaleMix != 0) { if (scaleX > 0.00001f) { scaleX *= ((target._ascaleX - 1 + _data._offsetScaleX) * scaleMix) + 1; } @@ -374,7 +374,7 @@ void TransformConstraint::applyRelativeLocal() { } float shearY = bone._ashearY; - if (shearMix > 0) { + if (shearMix != 0) { shearY += (target._ashearY + _data._offsetShearY) * shearMix; }