mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[csharp] Fix IkConstraint fix port. 73cb6299de
This commit is contained in:
parent
714f010006
commit
354ef48a64
@ -183,7 +183,7 @@ namespace Spine {
|
|||||||
float maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;
|
float maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;
|
||||||
c = -a * l1 / (aa - bb);
|
c = -a * l1 / (aa - bb);
|
||||||
if (c >= -1 && c <= 1) {
|
if (c >= -1 && c <= 1) {
|
||||||
float angle = (float)Math.Acos(c);
|
c = (float)Math.Acos(c);
|
||||||
x = a * (float)Math.Cos(c) + l1;
|
x = a * (float)Math.Cos(c) + l1;
|
||||||
y = b * (float)Math.Sin(c);
|
y = b * (float)Math.Sin(c);
|
||||||
d = x * x + y * y;
|
d = x * x + y * y;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user