round method Null safety
Returns the integer closest to this
.
Rounds away from zero when there is no closest integer:
(3.5).round() == 4
and (-3.5).round() == -4
.
If this
is not finite (NaN
or infinity), throws an UnsupportedError.
Implementation
int round();