From 4fd08425a59565d6426995f23151aa3eb50ce9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Thu, 18 Nov 2021 09:48:25 +0200 Subject: [PATCH] Improve hashvec for float4s. --- VM/src/ltable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VM/src/ltable.cpp b/VM/src/ltable.cpp index 6a01c149..87396036 100644 --- a/VM/src/ltable.cpp +++ b/VM/src/ltable.cpp @@ -114,7 +114,7 @@ static LuaNode* hashvec(const Table* t, const float* v) unsigned int h = (i[0] * 73856093) ^ (i[1] * 19349663) ^ (i[2] * 83492791); #ifdef LUA_FLOAT4_VECTORS - h ^= i[3]; // TODO: proper hashing function for 4D vectors + h ^= i[3] * 39916801; #endif return hashpow2(t, h);