Start fleshing out tracing library
This commit is contained in:
11
deps/ox/src/ox/std/math.hpp
vendored
11
deps/ox/src/ox/std/math.hpp
vendored
@@ -8,6 +8,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "typetraits.hpp"
|
||||
|
||||
namespace ox {
|
||||
|
||||
template<typename T>
|
||||
@@ -20,4 +22,13 @@ inline const T &max(const T &a, const T &b) {
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
template<typename I>
|
||||
inline I pow(I v, int e) {
|
||||
I out = 1;
|
||||
for (I i = 0; i < e; i++) {
|
||||
out *= v;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user