30 lines
No EOL
1.1 KiB
Text
30 lines
No EOL
1.1 KiB
Text
* print(...strings and values...) -- Prints to stderr. Very useful to 'probe' an expression.
|
|
Evaluates to the last value.
|
|
Example: `print("x is", x, "and y is", y)`
|
|
Example: `x + print("y:", y) + z == x+y+z`
|
|
|
|
* log(base=10, val) -- Logarithm with optional 'base' as first argument.
|
|
If not provided, 'base' defaults to '10'.
|
|
Example: `log(100) + log(e(), 100)`
|
|
|
|
* e() -- Euler's number (2.718281828459045)
|
|
* pi() -- π (3.141592653589793)
|
|
|
|
* int(val)
|
|
* ceil(val)
|
|
* floor(val)
|
|
* round(modulus=1, val) -- Round with optional 'modulus' as first argument.
|
|
Example: `round(1.23456) == 1 && round(0.001, 1.23456) == 1.235`
|
|
|
|
* abs(val)
|
|
* sign(val)
|
|
|
|
* min(val, ...) -- Example: `min(1, -2, 3, -4) == -4`
|
|
* max(val, ...) -- Example: `max(1, -2, 3, -4) == 3`
|
|
|
|
* sin(radians) * asin(val)
|
|
* cos(radians) * acos(val)
|
|
* tan(radians) * atan(val)
|
|
* sinh(val) * asinh(val)
|
|
* cosh(val) * acosh(val)
|
|
* tanh(val) * atanh(val) |