--- a/src/maths.h Sun Jan 26 01:06:27 2020 +0200 +++ b/src/maths.h Sun Jan 26 14:29:30 2020 +0200 @@ -18,6 +18,7 @@ #pragma once #include <cmath> +#include "utility.h" namespace math { @@ -90,3 +91,8 @@ return arg + sum<T>(rest...); } } + +inline unsigned int qHash(const glm::vec3& key) +{ + return qHash(key.x) ^ utility::rotl10(qHash(key.y)) ^ utility::rotl20(qHash(key.z)); +}