[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: math.atan2() return to standard build ?**
**From**: nobody <nobody+lua-list@...>
**Date**: Tue, 21 Feb 2017 01:12:39 +0100

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