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.