Generic Initializer

init(exactly:)

Creates a new decimal value exactly representing the provided integer.

Declaration

init?<T>(exactly source: T) where T : BinaryInteger

Parameters

source

The integer to convert.

Discussion

If source isn't representable as a Decimal instance, the result is nil.

Relationships

From Protocol

See Also

Creating a Decimal from an Integer

init(Int)

Creates and initializes a decimal with the provided integer value.

init(Int8)

Creates and initializes a decimal with the provided integer value.

init(Int16)

Creates and initializes a decimal with the provided integer value.

init(Int32)

Creates and initializes a decimal with the provided integer value.

init(Int64)

Creates and initializes a decimal with the provided integer value.

init(integerLiteral: Int)

Creates and initializes a decimal with the provided integer value.