abs | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns the absolute value of a number. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Control Structure: function Glossary: negative, return Function: trunc, round | ||||||
Description | Use the abs function if you need to know the magnitude of the number and are not concerned about whether it is negative or not. The absolute value of a number is that number's distance from zero. If the number is positive, its absolute value is just the number; if the number is negative, its absolute value is the negative of the number. Because of this, the absolute value of a number is always positive. | ||||||
Tags | math |