utx::fact calculates the factorial result of value.
constexpr auto result = utx::fact(unsigned_value);
constexpr auto result = utx::fact.fn<return_type>(unsigned_value);
constexpr auto result = utx::fact.fn<return_type, unsignned_arg_type>(value);
utx::fact(???) :
utx::fact.fn<return_type>(???) :
utx::fact.fn<return_type, unsigned_arg_type>(???) :
#include <utxcpp/math.hpp>
#include <utxcpp/core.hpp> #include <utxcpp/math.hpp> int main() { // arg_type is utx::u32 constexpr auto result1 = utx::fact(8u); // arg_type is utx::u32, result is converted to utx::f32 constexpr auto result1 = utx::fact<utx::f32>(8u); // arg_type is utx::ux32, result is converted to utx::ix32 constexpr auto result2 = utx::fact<utx::ix32, utx::ux32>(8); utx::print(result1, result2, result3); }