Expression
表达式是由 Float, 变量, 运算符和函数组成的. 表达式经过计算是 Float 类型的值.
Operators
The operators that can be used are:
+: Addition-: Subtraction*: Multiplication/: Division(): Parentheses, used to change the order of operations==: Is equal to,1if true,0otherwise.! =: If not equal, value is1if true,0otherwise.>: Is more than,1if true,0otherwise.<: Is less than,1if true,0otherwise.>=: Is more than or equal to,1if true,0otherwise.<=: Is less than or equal to,1if true,0otherwise.
函数
可以使用的函数有:
sin(x): 正弦函数cos(x): 余弦函数tan(x): 正切函数abs(x): Absolute value functionexp(x): 指数函数atan2(x): 反正切函数ln(x): 自然对数函数sig(x): 符号函数,x为+0或正数时返回1, 为-0或负数时返回-1step(x, y): 阶跃函数,x < y为0时返回1, 否则返回0floor(x): 向下取整函数ceil(x): 向上取整函数round(x): 四舍五入函数max(x, y...): 最大值函数min(x, y...): 最小值函数clamp(x, min, max): 将x限制在min和max之间
其中三角函数和反三角函数使用弧度制.