Abs函数
是返回绝对值的函数。
格式
Abs (数值)
参数
- 数值
- 以表达式或直接以数值进行指定。
返回值
返回已指定数值的绝对值。
说明
绝对值是指无符号的数值。例如,Abs(-1)和Abs(1),两者都将返回1。
参阅
Atan, Atan2, Cos, Int, Mod, Not, Sgn, Sin, Sqr, Str$, Tan, Val
Abs函数使用示例
下例通过命令窗口使用Print命令执行函数。
> print abs(1)
1
> print abs(-1)
1
> print abs(-3.54)
3.54
>
← AbortMotion Accel →