parent
6bb95363fe
commit
4a19209450
@ -0,0 +1,10 @@ |
||||
// Copyright SIX DAY LLC. All rights reserved. |
||||
|
||||
import Foundation |
||||
|
||||
extension Double { |
||||
func rounded(to places: Int) -> Double { |
||||
let divisor = pow(10.0, Double(places)) |
||||
return (self * divisor).rounded() / divisor |
||||
} |
||||
} |
Loading…
Reference in new issue