mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added the description for 'div' operator to notes.txt
This commit is contained in:
@@ -281,10 +281,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
|
||||||
|
|||||||
Reference in New Issue
Block a user