Question : how to show only 2 decimal places in swift
Answered by : bewildered-bison-13n5z68xwu0y
let myDouble = 3.141
let doubleStr = String(format: "%.2f", myDouble) // "3.14"
Source : https://stackoverflow.com/questions/34929932/round-up-double-to-2-decimal-places | Last Update : Thu, 04 Aug 22