round | ||||||||||
Type | function | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Rounds off a number to the nearest integer. | |||||||||
Introduced | 1.0 | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server, mobile | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Keyword: integer Function: compound, statRound, random, abs, extents, average Glossary: negative, HyperCard, return, decimal point Control Structure: function | |||||||||
Description | Use the round function to round off numbers and eliminate insignificant digits for financial applications. The round function performs financial-style rounding. If the number is exactly halfway between two numbers, round always rounds the number up if positive, down if negative. (To round off numbers without introducing any statistical upward bias, use the statRound function instead.) A positive precision indicates a place to the right of the decimal point, and a negative precision indicates a place to the left. For example, 1 rounds off to the nearest tenth, 2 rounds off to the nearest hundredth, -1 rounds off by ten, and so on. If you don't specify a precision, zero is used, meaning that the number is rounded off to a whole number.
| |||||||||
Tags | math |