Skip to content

Commit

Permalink
Merge pull request #920 from inviwo/feature/hash-qua
Browse files Browse the repository at this point in the history
Hash hashes qua instead of tquat closes #919 #920
  • Loading branch information
Groovounet authored Jul 9, 2019
2 parents 513af73 + 9a1f85a commit 4fc2897
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions glm/gtx/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ namespace std
};

template<typename T, glm::qualifier Q>
struct hash<glm::tquat<T,Q>>
struct hash<glm::qua<T,Q>>
{
GLM_FUNC_DECL size_t operator()(glm::tquat<T, Q> const& q) const;
GLM_FUNC_DECL size_t operator()(glm::qua<T, Q> const& q) const;
};

template<typename T, glm::qualifier Q>
Expand Down
4 changes: 2 additions & 2 deletions glm/gtx/hash.inl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace std
}

template<typename T, glm::qualifier Q>
GLM_FUNC_QUALIFIER size_t hash<glm::tquat<T, Q>>::operator()(glm::tquat<T,Q> const& q) const
GLM_FUNC_QUALIFIER size_t hash<glm::qua<T, Q>>::operator()(glm::qua<T,Q> const& q) const
{
size_t seed = 0;
hash<T> hasher;
Expand All @@ -77,7 +77,7 @@ namespace std
GLM_FUNC_QUALIFIER size_t hash<glm::tdualquat<T, Q>>::operator()(glm::tdualquat<T, Q> const& q) const
{
size_t seed = 0;
hash<glm::tquat<T, Q>> hasher;
hash<glm::qua<T, Q>> hasher;
glm::detail::hash_combine(seed, hasher(q.real));
glm::detail::hash_combine(seed, hasher(q.dual));
return seed;
Expand Down

0 comments on commit 4fc2897

Please sign in to comment.