Added "floor2" script function to work with ceil (#109)

Added the missing description of ceil to notes.txt.
Disabled ceil marco in lib.math.h.
Removed duplications in Utils.h.
This commit is contained in:
NovaRain
2018-04-28 11:07:37 +08:00
parent 57225bbd38
commit 31f42128e1
6 changed files with 21 additions and 12 deletions
@@ -265,6 +265,9 @@ Some utility/math functions are available:
> float exponent(float x)
- e^x
> int ceil(float x)
- round x to the nearest integer that is not less than x
> int round(float x)
- round x to the nearest integer
@@ -378,6 +381,10 @@ Some utility/math functions are available:
- The file name is limited to 63 chars, including the extension
- The section name is limited to 32 characters
> int sfall_func1("floor2", int/float value)
- works just like vanilla floor function, but returns correct integers for negative values
- vanilla floor function works exactly the same as ceil for negative values, much like trunc in C/C++
> int sfall_func1("item_weight", object)
- gets the current weight of an object