diff options
author | hnOsmium0001 <[email protected]> | 2022-04-18 20:18:09 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-04-18 20:59:31 -0700 |
commit | f77e73c01a15426bcc6e3d7fe5826d2a741fed38 (patch) | |
tree | 91330f87041a2b8a484b06a3c747a12370bd7034 /source/Utils.hpp | |
parent | 4b57fe1fb1401bab9439a639bd842ca61386fe22 (diff) |
Add Uid for IresObject
Diffstat (limited to 'source/Utils.hpp')
-rw-r--r-- | source/Utils.hpp | 6 |
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 { |