PrevUpHomeNext

esv::pow2/3/5/7


esv::pow2, esv::pow3, esv::pow5, esv::pow7

esv::pow2 is an object of the class esv::pow2_class.

esv::pow3 is an object of the class esv::pow3_class.

esv::pow5 is an object of the class esv::pow5_class.

esv::pow7 is an object of the class esv::pow7_class.

Calculate the result of 2,3,5,7 to the power of base.

The result type is the same as base type.

constexpr support.

Calling Sig

constexpr auto result1 = esv::pow2(base_value);

constexpr auto result2 = esv::pow3(base_value);

constexpr auto result3 = esv::pow5(base_value);

constexpr auto result4 = esv::pow7(base_value);

Header

#include <esvcpp/math.hpp>

Example

#include <esvcpp/math.hpp>
#include <esvcpp/core.hpp>

int main()
{
	constexpr auto x = esv::pow3(10); // 1000
	constexpr auto y = esv::pow3(10.0f, 3); // 1000.0f
	esv::print(x, y);
}

See Also

esv::npow

esv::print


PrevUpHomeNext

E