OCLOperators Number::round () : Integer
Number::round () : Integer
Returns the nearest integer to self if it is a Real and self if it is an Integer.
| Expression | Result |
|---|---|
| (2.3).round() | 2 |
| (2.5).round() | 3 |
| (2.8).round() | 3 |
| 2.round() | 2 |
Returns the nearest integer to self if it is a Real and self if it is an Integer.
| Expression | Result |
|---|---|
| (2.3).round() | 2 |
| (2.5).round() | 3 |
| (2.8).round() | 3 |
| 2.round() | 2 |
© MDRIVEN. All Rights Reserved
© MDRIVEN. All Rights Reserved