From 141c3755814cea60888c7ee548c7ce709550b784 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 18 Jun 2022 16:20:55 +0200 Subject: Clean up Hash Functions Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better) --- core/math/delaunay_3d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/math') diff --git a/core/math/delaunay_3d.h b/core/math/delaunay_3d.h index f8a10ec87e..4ab00e1f34 100644 --- a/core/math/delaunay_3d.h +++ b/core/math/delaunay_3d.h @@ -101,7 +101,7 @@ class Delaunay3D { _FORCE_INLINE_ static uint32_t hash(const Triangle &p_triangle) { uint32_t h = hash_djb2_one_32(p_triangle.triangle[0]); h = hash_djb2_one_32(p_triangle.triangle[1], h); - return hash_djb2_one_32(p_triangle.triangle[2], h); + return hash_fmix32(hash_djb2_one_32(p_triangle.triangle[2], h)); } }; -- cgit v1.2.3