lua-users home
lua-l archive

Re: math.atan2() return to standard build ?

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


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

AltStyle によって変換されたページ (->オリジナル) /