PrevUpHomeNext

esv::mod2n


Refuse to eat wild animals.

template <std::integral T, std::unsigned_integral U>
inline constexpr T esv::mod2n(const T & dividend, const U & n);

Calculate dividend % (2^n)

Divisor is (2^n)

The same as esv::mod, but set the divisor to 2^n. Please read the esv::mod doc page.

If n is zero, it gets zero .

Header

#include <esvcpp/math.hpp>

PrevUpHomeNext

esv::print