diff options
author | rtk0c <[email protected]> | 2022-04-18 20:59:31 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-18 20:59:31 -0700 |
commit | 7f871b04470766f0f5266cf949b65a54b7a6f79e (patch) | |
tree | 541b316fb564ffe12885586131a6ccd17662f662 /source/Utils.hpp | |
parent | 7af9992ca81c699bc1cf05eb691e284bf424f050 (diff) |
Changeset: 10 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 { |