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

This commit is contained in:
NovaRain
2020-02-05 23:21:15 +08:00
parent 8ab5b9b7e7
commit e153819bcd
+7 -2
View File
@@ -267,10 +267,15 @@ Some utility/math functions are available:
> int charcode(string string) > int charcode(string string)
- returns ASCII code for the first character in given 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) > ^ operator (exponentiation)
- use as any other arithmetic operator, like 5^(1/3) - 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 exponent is an integer, you can use a negative base, otherwise you will get "NaN" with a negative base
- if both arguments are integers, result will be integer - if both arguments are integers, the result will be an integer
> float log(float x) > float log(float x)
- natural logarithm of x - natural logarithm of x