Closed Deviatt closed 3 months ago
These functions were deprecated in lua 5.3 https://www.lua.org/manual/5.3/manual.html
The following functions were deprecated in the mathematical library: atan2, cosh, sinh, tanh, pow, frexp, and ldexp. You can replace math.pow(x,y) with x^y; you can replace math.atan2 with math.atan, which now accepts one or two arguments; you can replace math.ldexp(x,exp) with x * 2.0^exp. For the other operations, you can either use an external library or implement them in Lua.
Эти функции устарели в lua 5.3 https://www.lua.org/manual/5.3/manual.html
В математической библиотеке объявлены устаревшими следующие функции: atan2, cosh, sinh, tanh, pow, frexp и ldexp. Вы можете заменить math.pow(x,y) на x^y; Вы можете заменить math.atan2 на math.atan, который теперь принимает один или два аргумента; Вы можете заменить math.ldexp(x,exp) на x * 2.0^exp. Для остальных операций можно либо использовать внешнюю библиотеку, либо реализовать их на Lua.
Oh, thank you. I forgot that my build is backwards compatible. Don't you think you should do the same?
I think we should stick to the current state and let scripters add these functions to their project if necessary, so the lua documentation of the version used by the game will be 1:1 with what will be available on the game
Prerequisites
Your Environment
Description
It's possible that these functions were removed due to inattention or developer discretion. I think you need to restore the integrity of the standard Lua library.
The frexp/ldexp functions for those who might need it:
Steps to reproduce the behavior
Console.Log(NanosTable.Dump(math))
Expected behavior
These functions should exist by default, as they are part of the standard Lua library. This may seem useless to some, but it should be implemented by default!
Actual behavior
Nanos Lua
LuaPUC 5.4.2
![image](https://i.imgur.com/5SlScMP.png)