Round Double to 3 decimal numbers

Hey there,

 

how it is (easily!) possible to round a double to 3 decimal numbers in Swift 5?

Example:

let double = 34.53320218

print(double rounded)

 

Thank you!

Powered by WPeMatico

About

You may also like...

Comments are closed.