Function |checked_div
std/ops/num::|checked_div
Usage
|checked_div<N>(a, b)
Generics
โป N:
CheckedDiv
Parameters
โณ a:
N
โณ b:
N
Return
โด Option<N>
Divide a
by b
, checking if division is possible or if overflow occurs
This function returns an option containing a รท b
, or none if division is not possible (as division by 0), or result cause overflow in data type.