Merge pull request #636 from iboB/master

[spine-c] Fixed spBone_worldToLocalRotationY
This commit is contained in:
Mario Zechner 2016-07-15 12:40:36 +02:00 committed by GitHub
commit bfa6f7dccd

View File

@ -213,7 +213,7 @@ float spBone_worldToLocalRotationX (spBone* self) {
float spBone_worldToLocalRotationY (spBone* self) { float spBone_worldToLocalRotationY (spBone* self) {
spBone* parent = self->parent; spBone* parent = self->parent;
if (self->parent) return self->rotation; if (!parent) return self->rotation;
return ATAN2(parent->a * self->d - parent->c * self->b, parent->d * self->b - parent->b * self->d) * RAD_DEG; return ATAN2(parent->a * self->d - parent->c * self->b, parent->d * self->b - parent->b * self->d) * RAD_DEG;
} }