mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-10 04:36:57 +08:00
Removed locals with single access.
Don't even remember why those two methods were added.
This commit is contained in:
parent
787af5c8f8
commit
bcc48327a2
@ -357,15 +357,15 @@ public class Bone implements Updatable {
|
|||||||
public float worldToLocalRotationX () {
|
public float worldToLocalRotationX () {
|
||||||
Bone parent = this.parent;
|
Bone parent = this.parent;
|
||||||
if (parent == null) return arotation;
|
if (parent == null) return arotation;
|
||||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c;
|
float a = this.a, c = this.c;
|
||||||
return atan2(pa * c - pc * a, pd * a - pb * c) * radDeg;
|
return atan2(parent.a * c - parent.c * a, parent.d * a - parent.b * c) * radDeg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float worldToLocalRotationY () {
|
public float worldToLocalRotationY () {
|
||||||
Bone parent = this.parent;
|
Bone parent = this.parent;
|
||||||
if (parent == null) return arotation;
|
if (parent == null) return arotation;
|
||||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d;
|
float b = this.b, d = this.d;
|
||||||
return atan2(pa * d - pc * b, pd * b - pb * d) * radDeg;
|
return atan2(parent.a * d - parent.c * b, parent.d * b - parent.b * d) * radDeg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rotateWorld (float degrees) {
|
public void rotateWorld (float degrees) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user