Added the description for 'div' operator to notes.txt

This commit is contained in:
NovaRain
2020-02-05 23:19:36 +08:00
parent fc78983f77
commit c079d69291
+7 -2
View File
@@ -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