diff --git a/math/fp.hpp b/math/fp.hpp index 8f9c9ab..7b5b6eb 100644 --- a/math/fp.hpp +++ b/math/fp.hpp @@ -89,6 +89,18 @@ constexpr inline fp operator+(const fp& a, const fp& return fp(a.value + b.value, fp_raw_tag{}); } +template +constexpr inline fp operator>>(const fp& a, int s) +{ + return fp(a.value >> s, fp_raw_tag{}); +} + +template +constexpr inline fp operator<<(const fp& a, int s) +{ + return fp(a.value << s, fp_raw_tag{}); +} + template constexpr inline fp operator-(const fp& a, const fp& b) {