From 7f871b04470766f0f5266cf949b65a54b7a6f79e Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 18 Apr 2022 20:59:31 -0700 Subject: Changeset: 10 Add Uid for IresObject --- source/Utils.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/Utils.hpp') 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 +void HashCombine(std::size_t& seed, const T& v) { + seed ^= std::hash{}(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); +} + } // namespace Utils struct StringHash { -- cgit v1.2.3-70-g09d2