lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On Feb 20, 2017, at 4:12 PM, nobody <nobody+lua-list@afra-berlin.de> wrote:
> 
> On 2017-02-21 01:08, Tim Hill wrote:
>> Fortunately, most of the game engines are still on Lua 5.2 and so
>> have math.atan2(), and those on 5.3 mostly to have thrown the
>> necessary switch to retain the old math functions in the 5.3 build.
>> *snip*
> 
> It never went away!  Just leave off the '2'. :)
> 
>> # math.atan (y [, x])
>> 
>> Returns the arc tangent of y/x (in radians), but uses the signs of
>> both parameters to find the quadrant of the result. (It also handles
>> correctly the case of x being zero.)
>> 
>> The default value for x is 1, so that the call math.atan(y) returns
>> the arc tangent of y.
>> 
>> -- https://www.lua.org/manual/5.3/manual.html#pdf-math.atan
> 
> -- nobody
> 

Doh! I’d never even noticed that change .. thanks for pointing this out! :)

—Tim