It doesn't work inside Double struct, but the solution was even simpler. I just used:
let precisionNumber = pow(10, Double(places))
Topic:
App & System Services
SubTopic:
General
Tags: