Skip to content

Foundation Library

Math

We can round decimal values to round them according to our requirement.

var x = 5.3
x.round()
// x == 5.0

Apple Docs