Math rounding VCL features
Rounding of numbers.
- math.ceil() — Computes the smallest integer value greater than or equal to the given value.
- math.floor() — Computes the largest integer value less than or equal to the given value.
- math.round() — Rounds x to the nearest integer, with ties away from zero (commercial rounding).
- math.roundeven() — Rounds x to nearest, ties to even (bankers' rounding).
- math.roundhalfdown() — Rounds to nearest, ties towards negative infinity (half down).
- math.roundhalfup() — Rounds to nearest, ties towards positive infinity (half up).
- math.trunc() — Truncates x to an integer value less than or equal in absolute value.
See rounding modes for details of the rounding modes provided by these functions and for an overview of example values.