diff --git a/src/hack/math/math.hpp b/src/hack/math/math.hpp index 93e3ba3..d1f00dd 100755 --- a/src/hack/math/math.hpp +++ b/src/hack/math/math.hpp @@ -41,4 +41,10 @@ namespace hack::math // см. wiki/math return n * (2 * a1 + (n - 1) * d) / 2; } + + template + constexpr T square(T x) { return x * x; } + + template + constexpr T cube(T x) { return x * x * x; } }