Skip to content
Permalink
Browse files

Add `math.tau` (#477)

* Add `math.tau`

Convenience for the commonly used value.
  • Loading branch information...
sprunk authored and rtri committed Oct 7, 2019
1 parent 9b37446 commit 5b002c57f5e7e8dcd7a61a9495854a6c8449cf08
Showing with 3 additions and 1 deletion.
  1. +3 −1 rts/lib/lua/src/lmathlib.cpp
@@ -272,8 +272,10 @@ static const luaL_Reg mathlib[] = {
*/
LUALIB_API int luaopen_math (lua_State *L) {
luaL_register(L, LUA_MATHLIBNAME, mathlib);
lua_pushnumber(L, PI);
lua_pushnumber(L, math::PI);
lua_setfield(L, -2, "pi");
lua_pushnumber(L, math::TWOPI);
lua_setfield(L, -2, "tau");
#if STREFLOP_ENABLED
lua_pushnumber(L, math::SimplePositiveInfinity); // streflop
#else

0 comments on commit 5b002c5

Please sign in to comment.
You can’t perform that action at this time.