Expression
Expressions are composed of Float
, variables, operators and functions. The expression is evaluated to a value of type Float
.
Operators
The operators that can be used are:
+
: Addition-
: Subtraction*
: Multiplication/
: Division()
: Parentheses, used to change the order of operations==
: Is equal to,1
if true,0
otherwise.! =
: If not equal, value is1
if true,0
otherwise.>
: Is more than,1
if true,0
otherwise.<
: Is less than,1
if true,0
otherwise.>=
: Is more than or equal to,1
if true,0
otherwise.<=
: Is less than or equal to,1
if true,0
otherwise.
Functions
The functions that can be used are:
sin(x)
: Sine functioncos(x)
: Cosine functiontan(x)
: Tangent functionabs(x)
: Absolute value functionexp(x)
: Exponential functionatan2(x)
: Inverse tangent functionln(x)
: Natural logarithmic functionsig(x)
: Sign function, returns1
whenx
is+0
or a positive number, returns-1
when it is-0
or a negative numberstep(x, y)
: Step function, returns1
whenx < y
is0
, otherwise returns0
floor(x)
: Floor functionceil(x)
: Ceiling functionround(x)
: Rounding functionmax(x, y...)
: Maximum functionmin(x, y...)
: Minimum functionclamp(x, min, max)
: Clampx
betweenmin
andmax
The radian system is used for both trigonometric and inverse trigonometric functions.