mherkender / lua.js

An ECMAscript framework to compile and run Lua code, allowing Lua to run in a browser or in Flash
http://blog.brokenfunction.com/
600 stars 73 forks source link

Fixed math.rad #11

Closed Fireblend closed 12 years ago

Fireblend commented 12 years ago

Discovered that the math.rad implementation was wrong after it broke a project of mine. The fix was simple enough (tested it on my project); please check the commit attached to this pull request and the following page if you want to verify the correct formula:

http://en.wikipedia.org/wiki/Radian

Regards,

Sergio

mherkender commented 12 years ago

You're correct. I actually mixed up the math.deg and math.rad functions.