666 Subscribers
5
If you get a disabled content restrictions error: It's on Paradox to review/restore it (bug them not me).
If you have any issues with this mod then please send me a bug report instead of reporting the mod.
Modders only (unless it's a mod that uses these functions).
For some reason SM doesn't have any of lua "math." functions.
Functions are either from SM (math.min = Min()), or pure lua.
SM and certain SM functions have issues with floats: 5 == 5.5 returns true for one (though 5.0 == 5.5 returns false).
Which is why I'm not just using math.cos = cos... (you can access them as math.sm_cos)
I'm going for accuracy not speed: Bench with GetPreciseTicks()
Implemented:
abs, ceil, deg, exp, floor, fmod, huge, log, max, maxinteger, min, mininteger, modf, pi, rad, random, randomseed, sqrt, tointeger, type, ult
Not implemented yet:
cos, sin, tan, acos, asin, atan
I'm only implementing the ones listed in the manual, if you have some to add: feel free to send them to me.
Functions should return values according to:
If the result it gives is different then my func: Please let me know.
v6 - Released 2022-09-22
v5 - Released 2021-09-07
v4 - Released 2019-11-08
v3 - Released 2019-08-04
v2 - Released 2019-05-22
REQUIREMENTS
Surviving Mars
Full game
FORUM LINKS