aboutsummaryrefslogtreecommitdiff
path: root/source/Utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Utils.hpp')
-rw-r--r--source/Utils.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/Utils.hpp b/source/Utils.hpp
index 6239667..63e610f 100644
--- a/source/Utils.hpp
+++ b/source/Utils.hpp
@@ -23,8 +23,14 @@ constexpr float Abs(float v) noexcept {
bool InRangeInclusive(int n, int lower, int upper);
bool LineContains(glm::ivec2 p1, glm::ivec2 p2, glm::ivec2 candidate);
+
bool IsColinear(glm::ivec2 p1, glm::ivec2 p2);
+template <class T>
+void HashCombine(std::size_t& seed, const T& v) {
+ seed ^= std::hash<T>{}(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+}
+
} // namespace Utils
struct StringHash {