| 632 | return LPOOL.IsValid(L); |
| 633 | } |
| 634 | static int Angle(lua_State* L)LNOEXCEPT |
| 635 | { |
| 636 | if (lua_gettop(L) == 2) |
| 637 | { |
| 638 | if (!lua_istable(L, 1) || !lua_istable(L, 2)) |
| 639 | return luaL_error(L, "invalid lstg object for 'Angle'."); |
| 640 | lua_rawgeti(L, 1, 2); // t(object) t(object) ??? id |
| 641 | lua_rawgeti(L, 2, 2); // t(object) t(object) ??? id id |
| 642 | double tRet; |
| 643 | if (!LPOOL.Angle((size_t)luaL_checkint(L, -2), (size_t)luaL_checkint(L, -1), tRet)) |
| 644 | return luaL_error(L, "invalid lstg object for 'Angle'."); |
| 645 | lua_pushnumber(L, tRet); |
| 646 | } |
| 647 | else |
| 648 | { |
| 649 | lua_pushnumber(L, |
| 650 | atan2(luaL_checknumber(L, 4) - luaL_checknumber(L, 2), luaL_checknumber(L, 3) - luaL_checknumber(L, 1)) * LRAD2DEGREE |
| 651 | ); |
| 652 | } |
| 653 | return 1; |
| 654 | } |
| 655 | static int Dist(lua_State* L)LNOEXCEPT |
| 656 | { |
| 657 | if (lua_gettop(L) == 2) |
nothing calls this directly
no outgoing calls
no test coverage detected