Function |abs
std/ops/num::|abs
Usage
|abs<N>(value)
Generics
◻ N:
Signed
Parameters
↳ value:
N
Return
↴ Option<N>
Return absolute value.
If the absolute value cannot fit into the type itself (such as i8
-128
that cannot be turned into 128
), none value is returned.