Function mycelium_util::math::usize_const_checked_log
source ยท pub const fn usize_const_checked_log(n: usize, base: usize) -> Option<usize>
Expand description
Returns the base
logarithm of n
.
This is exposed in addition to the Logarithm
extension trait because it
is a const fn
, while trait methods cannot be const fn
s.