protocol
_IntegerArithmeticType
Inheritance | View Protocol Hierarchy → |
---|---|
Import |
|
Static Methods
Add lhs
and rhs
, returning a result and a Bool
that is
true iff the operation caused an arithmetic overflow.
Declaration
static
func
addWithOverflow
(
lhs
:
Self
,
_
rhs
:
Self
) -
>
(
Self
,
overflow
:
Bool
)
Divide lhs
and rhs
, returning a result and a Bool
that is
true iff the operation caused an arithmetic overflow.
Declaration
static
func
divideWithOverflow
(
lhs
:
Self
,
_
rhs
:
Self
) -
>
(
Self
,
overflow
:
Bool
)
Multiply lhs
and rhs
, returning a result and a Bool
that is
true iff the operation caused an arithmetic overflow.
Declaration
static
func
multiplyWithOverflow
(
lhs
:
Self
,
_
rhs
:
Self
) -
>
(
Self
,
overflow
:
Bool
)
Divide lhs
and rhs
, returning the remainder and a Bool
that is
true iff the operation caused an arithmetic overflow.
Declaration
static
func
remainderWithOverflow
(
lhs
:
Self
,
_
rhs
:
Self
) -
>
(
Self
,
overflow
:
Bool
)
Subtract lhs
and rhs
, returning a result and a Bool
that is
true iff the operation caused an arithmetic overflow.
Declaration
static
func
subtractWithOverflow
(
lhs
:
Self
,
_
rhs
:
Self
) -
>
(
Self
,
overflow
:
Bool
)
This protocol is an implementation detail of
IntegerArithmeticType
; do not use it directly.Its requirements are inherited by
IntegerArithmeticType
and thus must be satisfied by types conforming to that protocol.