mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Improve hashvec for float4s.
This commit is contained in:
parent
e00b92c3c6
commit
4fd08425a5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
unsigned int h = (i[0] * 73856093) ^ (i[1] * 19349663) ^ (i[2] * 83492791);
|
||||||
|
|
||||||
#ifdef LUA_FLOAT4_VECTORS
|
#ifdef LUA_FLOAT4_VECTORS
|
||||||
h ^= i[3]; // TODO: proper hashing function for 4D vectors
|
h ^= i[3] * 39916801;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return hashpow2(t, h);
|
return hashpow2(t, h);
|
||||||
|
|
Loading…
Add table
Reference in a new issue