Mjolnir Core
Core functionality of the Mjolnir API

◆ power_of_2()

constexpr auto power_of_2 ( std::integral auto  exponent) -> T_Type
constexprnoexcept

Calculate the power of 2 using an integer based exponent.

Note
This function is faster than the power function with a base of 2.
Template Parameters
T_TypeAn integer or floating-point type used for the returned value
Parameters
[in]exponentThe exponent
Returns
The result of the power function