From efab42d1b5d47ab847f45e5c52e8c18c72828482 Mon Sep 17 00:00:00 2001 From: Luke Ingram Date: Tue, 24 Mar 2026 15:48:54 -0400 Subject: [PATCH] [cpp] Resolves #2974, brings spine-cpp inline with spine-libgdx. --- spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp index 3fea0ac51..49ee366c4 100644 --- a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp @@ -180,14 +180,14 @@ void TransformConstraint::applyAbsoluteWorld() { bone._worldY += (ty - bone._worldY) * mixY; } - if (mixScaleX > 0) { + if (mixScaleX != 0) { float s = MathUtil::sqrt(bone._a * bone._a + bone._c * bone._c); if (s != 0) s = (s + (MathUtil::sqrt(ta * ta + tc * tc) - s + _data._offsetScaleX) * mixScaleX) / s; bone._a *= s; bone._c *= s; } - if (mixScaleY > 0) { + if (mixScaleY != 0) { float s = MathUtil::sqrt(bone._b * bone._b + bone._d * bone._d); if (s != 0) s = (s + (MathUtil::sqrt(tb * tb + td * td) - s + _data._offsetScaleY) * mixScaleY) / s; bone._b *= s;