Returns the quotient obtained by dividing this value by the given value, along with a Boolean value indicating whether overflow occurred in the operation.
SDK
- Xcode 7.1+
Framework
- Swift Standard Library
Declaration
Parameters
rhsThe value to divide this value by.
Return Value
A tuple containing the result of the division along with a Boolean value indicating whether overflow occurred. If the overflow component is false, the partial component contains the entire quotient. If the overflow component is true, an overflow occurred and the partial component contains either the truncated quotient or, if the quotient is undefined, the dividend.
Discussion
Dividing by zero is not an error when using this method. For a value x, the result of x is (x, true).