utx::pow2 is an object of the class utx::pow2_class.
utx::pow3 is an object of the class utx::pow3_class.
utx::pow5 is an object of the class utx::pow5_class.
utx::pow7 is an object of the class utx::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.
constexpr auto result1 = utx::pow2(base_value); constexpr auto result2 = utx::pow3(base_value); constexpr auto result3 = utx::pow5(base_value); constexpr auto result4 = utx::pow7(base_value);
#include <utxcpp/math.hpp>
#include <utxcpp/math.hpp> #include <utxcpp/core.hpp> int main() { constexpr auto x = utx::pow3(10); // 1000 constexpr auto y = utx::pow3(10.0f, 3); // 1000.0f utx::print(x, y); }