Skip to content

Commit

Permalink
[csharp] Fixed undefined MathUtils.Atan2Deg when USE_FAST_SIN_COS_ATA…
Browse files Browse the repository at this point in the history
…N2_APPROXIMATIONS enabled. Closes #2517.
  • Loading branch information
HaraldCsaszar committed May 6, 2024
1 parent 8b59c10 commit 527b928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions spine-csharp/src/MathUtils.cs
Expand Up @@ -78,6 +78,10 @@ public static class MathUtils {
return sin[(int)((degrees + 90) * DegToIndex) & SIN_MASK];
}

static public float Atan2Deg (float y, float x) {
return Atan2(y, x) * RadDeg;
}

/// <summary>Returns atan2 in radians, faster but less accurate than Math.Atan2. Average error of 0.00231 radians (0.1323
/// degrees), largest error of 0.00488 radians (0.2796 degrees).</summary>
static public float Atan2 (float y, float x) {
Expand Down
2 changes: 1 addition & 1 deletion spine-csharp/src/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-csharp",
"displayName": "spine-csharp Runtime",
"description": "This plugin provides the spine-csharp core runtime.",
"version": "4.2.22",
"version": "4.2.23",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",
Expand Down

0 comments on commit 527b928

Please sign in to comment.