core :: Float :: round
assert 1.67.round == 2.0 assert 1.34.round == 1.0 assert -1.34.round == -1.0 assert -1.67.round == -2.0
# Rounds the value of a float to its nearest integer value # # assert 1.67.round == 2.0 # assert 1.34.round == 1.0 # assert -1.34.round == -1.0 # assert -1.67.round == -2.0 fun round: Float `{ return round(self); `}