Calculates the absolute value of a number.
A number's absolute value is its distance from zero on the number line. -5 and 5 are both five units away from zero, so calling abs(-5) and abs(5) both return 5. The absolute value of a number is always positive.
示例
语法
abs(n)
参数
n
Number:
number to compute.
返回值
Number: absolute value of given number.
This page is generated from the comments in src/math/calculation.js . Please feel free to edit it and submit a pull request!