diff --git a/artifacts/scripting/sfall function notes.txt b/artifacts/scripting/sfall function notes.txt index 34d83043..23ea88fa 100644 --- a/artifacts/scripting/sfall function notes.txt +++ b/artifacts/scripting/sfall function notes.txt @@ -281,10 +281,15 @@ Some utility/math functions are available: > int charcode(string string) - returns ASCII code for the first character in given string +> div operator (unsigned integer division) +- use as a division operator, like 3 + (20 div 5) +- if both dividend and divisor are integers, they will be treated as unsigned integers +- if one of them is a float, div will perform the signed division just like vanilla division operator + > ^ operator (exponentiation) - use as any other arithmetic operator, like 5^(1/3) -- if exponent is integer, you can use negative base, otherwise you will get "nan" with negative base -- if both arguments are integers, result will be integer +- if exponent is an integer, you can use a negative base, otherwise you will get "NaN" with a negative base +- if both arguments are integers, the result will be an integer > float log(float x) - natural logarithm of x