Required Instance Methodswift 6.0.1Swift

    dividedReportingOverflow(by:)

    Returns the quotient obtained by dividing this value by the given value, along with a Boolean value indicating whether overflow occurred in the operation.

    func dividedReportingOverflow(by rhs: Self) -> (partialValue: Self, overflow: Bool)

    Parameters

    rhs

    The value to divide this value by.

    Returns

    A tuple containing the result of the division along with a Boolean value indicating whether overflow occurred. If the overflow component is false, the partialValue component contains the entire quotient. If the overflow component is true, an overflow occurred and the partialValue component contains either the truncated quotient or, if the quotient is undefined, the dividend.

    Dividing by zero is not an error when using this method. For a value x, the result of x.dividedReportingOverflow(by: 0) is (x, true).

    Other requirements

    Type members

    Instance members