Round
Rounds a number to the nearest integer, with halves rounding away from zero.
Category: Math
Returns: int
Signature
Round(value)
The argument can be an int (returns unchanged), decimal, or
number. The rounding rule is always “away from zero”: 2.5 rounds
to 3, and -2.5 rounds to -3. This differs from banker’s rounding
(round-half-to-even), which some languages use as the default.
Examples
Round(3.7) // 4
Round(3.2) // 3
Round(2.5) // 3: away from zero, not banker's
Round(-2.5) // -3: away from zero
Round(0.5) // 1
Round(hp / count) // average, rounded to nearest int
Notes
The half-away-from-zero rule is consistent across all inputs. There is no banker’s rounding edge case. For truncation without rounding, use Int. For ceiling or flooring, see Ceil and Floor.