Template Function librapid::exp2(T)#

Function Documentation#

template<typename T>
constexpr auto librapid::exp2(T val)#

Return 2 raised to a given power. Note that, for integer values, this function will cast the input value to a floating point type before calculating the exponential.

Template Parameters

T – Data type

Parameters

val – Input value

Returns

2 raised to the input value