Skip to content
This repository was archived by the owner on Jul 2, 2018. It is now read-only.

Decimal precision #80

Open
0x7061 opened this issue Jun 23, 2017 · 0 comments
Open

Decimal precision #80

0x7061 opened this issue Jun 23, 2017 · 0 comments

Comments

@0x7061
Copy link

0x7061 commented Jun 23, 2017

Hi,

I don't seem to figure out how to set a fixed precision, let's say 4.

I tried:

price = EUR(coin.price) // Double
...
cell.price.text = "\((price as EUR).formatted(withStyle: NumberFormatter.Style.decimal))"

Would be glad to get some insight, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant