Peano
Loading...
Searching...
No Matches
math.h
Go to the documentation of this file.
1#pragma once
2
3#include <concepts>
4
5#include <lang/type.h>
6
7template<typename T> requires std::is_integral_v<T>
8constexpr T pow_constexpr(T val, T exp) {
9 T res = 1;
10 for (u32 i = 0; i < exp; i++) res *= val;
11 return res;
12}
constexpr T pow_constexpr(T val, T exp)
Definition math.h:8
std::uint32_t u32
Definition type.h:11