Returns a tuple containing the quotient and remainder obtained by dividing the given value by this value.
- Xcode 9.0+
- Swift Standard Library
A tuple containing the high and low parts of a double-width integer.
A tuple containing the quotient and remainder obtained by dividing
dividend by this value.
The resulting quotient must be representable within the bounds of the type. If the quotient is too large to represent in the type, a runtime error may occur.
The following example divides a value that is too large to be represented using a single
Int instance by another
Int value. Because the quotient is representable as an
Int, the division succeeds.