Function Name | Description |
abs(x) 绝对值 | Absolute value of x |
acos(x) 反余弦的实部 | Real part of the arc cosine of x, e.g., acos(-5) returns 3.14159, not 3.14159+2.29243i |
arccos(x) | Synonym for acos() |
acosh(x) 反双曲余弦的实部 | Real part of the arc hyperbolic cosine of x, e.g., acosh(.5) returns 0, not 1.0472i |
asin(x) 反正弦的实部 | Real part of the arc sine of x, e.g., asin(-5) returns -1.57080, not -1.57080+2.29243i |
arcsin(x) | Synonym for asin() |
asinh(x) 反双曲正弦 | Arc hyperbolic sine |
atan(x) 反正切 | Arc tangent of x |
arctan(x) | Synonym for atan() |
atan2(y,x) 四象限圆弧切线 | Four quadrant arc tangent of y/x |
atanh(x) 反双曲正切 | Arc hyperbolic tangent |
buf(x) | 1 if x > .5, else 0 |
cbrt(x) 立方根 | Cube root of (x) |
ceil(x) 等于或大于x的整数 | Integer equal or greater than x |
cos(x) 角的余弦 | Cosine of x |
cosh(x) 双曲cosx | Hyperbolic cosine of x |
exp(x) E的x次方 | e to the x |
fabs(x) abs (x)一样 | Same as abs(x) |
flat(x) 在-x和x之间有均匀分布的随机数 | Random number between -x and x with uniform distribution |
floor(x) 等于或小于x的整数 | Integer equal to or less than x |
gauss(x) 来自高斯分布的随机数和 | Random number from Gaussian distribution with sigma of x. |
hypot(x,y) 平方和 | sqrt(x**2 + y**2) |
if(x,y,z) 比较 | If x > .5, then y else z |
int(x) 取整 | Convert x to integer |
inv(x) 四舍五入 | 0. if x > .5, else 1. |
limit(x,y,z) x y z的中间值 | Intermediate value of x, y, and z |
ln(x) x的自然对数 | Natural logarithm of x |
log(x) ln()的替代语法 | Alternate syntax for ln() |
log10(x) 以10为底的对数 | Base 10 logarithm |
max(x,y) x或y的最大值 | The greater of x or y |
mc(x,y) 一个在x*(1+y)和x*(1-y)之间具有均匀分布的随机数 | A random number between x*(1+y) and x*(1-y) with uniform distribution. |
min(x,y) x或y的最小值 | The smaller of x or y |
pow(x,y) x**y的实部 | Real part of x**y, e.g., pow(-.5,1.5) returns 0., not 0.353553i |
pwr(x,y) | abs(x)**y |
pwrs(x,y) | sgn(x)*abs(x)**y |
rand(x) 根据x的整数值,0到1之间的随机数 | Random number between 0 and 1 depending on the integer value of x. |
random(x) 类似于rand(),但是值之间的平滑过渡 | Similar to rand(), but smoothly transitions between values. |
round(x) 最接近x的整数 | Nearest integer to x |
sgn(x) x的迹象 | Sign of x |
sin(x) | Sine of x |
sinh(x) | Hyperbolic sine of x |
sqrt(x) | Real part of the square root of x, e.g., sqrt(-1) returns 0, not 0.707107i |
table(x,a,b,c,d,...) | Interpolate a value for x based on a look up table given as a set of pairs of points. |
tan(x) | Tangent of x. |
tanh(x) | Hyperbolic tangent of x |
u(x) | Unit step, i.e., 1 if x > 0., else 0. |
uramp(x) | x if x > 0., else 0. |
Operand | Description |
& 将表达式两边转换为布尔值,然后是AND | Convert the expressions to either side to Boolean, then AND. |
| 将表达式两边转换为布尔值,然后是OR | Convert the expressions to either side to Boolean, then OR. |
^ 将表达式两边转换为布尔值,然后是XOR值 | Convert the expressions to either side to Boolean, then XOR. |
> | True if expression on the left is greater than the expression on the right, otherwise false. |
< | True if expression on the left is less than the expression on the right, otherwise false. |
>= | True if expression on the left is greater than or equal the expression on the right, otherwise false. |
<= | True if expression on the left is less than or equal the expression on the right, otherwise false. |
+ | Floating point addition |
- | Floating point subtraction |
* | Floating point multiplication |
/ | Floating point division |
** | Raise left hand side to power of right hand side, only real part is returned, e.g., -2**1.5 returns zero, not 2.82843i |
欢迎光临 照明论坛-LED论坛-照明家族 (http://lightingfamily.net/) | Powered by Discuz! X3.4 |