InitializerFoundationEssentials
init(exactly:)
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
Creates a new decimal value exactly representing the provided integer.
init?<T>(exactly source: T) where T : BinaryInteger
Parameters
sourceThe integer to convert.
Discussion
If source isn’t representable as a Decimal instance, the result is nil.