Skip to content

Fix Deg2Rad and Rad2Deg being swapped in Natives.lua - #12

Open
mdlsvensson wants to merge 1 commit into
Drake53:masterfrom
wc3-dev:d53/deg2rad
Open

mdlsvensson wants to merge 1 commit into
Drake53:masterfrom
wc3-dev:d53/deg2rad

Conversation

@mdlsvensson

Copy link
Copy Markdown

Natives.lua sets Deg2Rad = math.deg and Rad2Deg = math.rad, the wrong way round.

Checked in 5.3 (print(Deg2Rad(180), Rad2Deg(math.pi)) after loading the file):

  • before: 10313.240312355 0.054831135561608
  • after: 3.1415926535898 180.0

My fork has used this fix since october

Deg2Rad was math.deg and Rad2Deg math.rad, so Deg2Rad(180) gave 10313.24 instead of pi.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant