9template <>
struct hash<
glm::vec3> {
11 size_t h1 = std::hash<float>{}(
v.x);
12 size_t h2 = std::hash<float>{}(
v.y);
13 size_t h3 = std::hash<float>{}(
v.z);
14 return h1 ^ (h2 << 1) ^ (h3 << 2);
19template <>
struct hash<
glm::vec2> {
21 size_t h1 = std::hash<float>{}(
v.x);
22 size_t h2 = std::hash<float>{}(
v.y);
23 return h1 ^ (h2 << 1);
28template <
typename T>
struct hash<
std::vector<T>> {
31 for (
const auto &elem : vec) {
32 result ^= std::hash<T>{}(elem) + 0x9e3779b9 + (result << 6) + (result >> 2);
Definition glm_printing.hpp:28
size_t operator()(const glm::vec2 &v) const
Definition hashing.hpp:20
size_t operator()(const glm::vec3 &v) const
Definition hashing.hpp:10
size_t operator()(const std::vector< T > &vec) const
Definition hashing.hpp:29