OCLOperators Number::round () : Integer
This page was created by Peter on 2019-12-06. Last edited by 62.169.16.147 on 2026-09-12.
Number::round () : Integer[edit source]
Returns the nearest integer to self if it is a Real, self if it is an Integer.
| Expression | Result |
|---|---|
| (2.3).round() | 2 |
| (2.5).round() | 3 |
| (2.8).round() | 3 |
| 2.round() | 2 |
