Expand description
Utility functions for doing simple things in a const
function.
Modules§
Functions§
- cond
- Returns
if_true
if cond is true, and otherwise returnsif_false
- is_zero
- Returns 1 if
n
is zero and 0 ifn
is greater than zero - max
- Returns the maximum of
a
andb
- min
- Returns the minimum of
a
andb
- not_
zero - Returns 1 if
n
is zero and 0 ifn
is greater than zero - safe_
div - Returns
dividend - divisor
if divisor isn’t zero, andcore::usize::MAX
otherwise.