Converter double para decimal

Ola alguem ai sabe como converter double para decimal no swift

There is no data type decimal in Swift. Dou you meant Int?

@tiagowt Please ask your question in English to get proper help for it. Thank you!

@jj_tagy,
There is a data structure called Decimal in swift (https://developer.apple.com/documentation/foundation/decimal)

Good to know, thanks. So is data structure a data type?

Hi @jj_tagy, there was a Number type with Objective-C called NSDecimal and this is the Swift version of the same.

In Swift every structure is a data type, however things like Int, Float, Double, String are commonly used data types (also called Primitives in other languages).

cheers,

This topic was automatically closed after 166 days. New replies are no longer allowed.