Commit: fa8ff63b48d2064701e1cc9929549c79c5dd73c3
Author: Campbell Barton
Date:   Tue Jul 15 13:06:33 2014 +1000
https://developer.blender.org/rBfa8ff63b48d2064701e1cc9929549c79c5dd73c3

Edgehash: Improve magic number for hashing

Gives consistently better results. Tested with wide variety of meshes.

===================================================================

M       source/blender/blenlib/intern/edgehash.c

===================================================================

diff --git a/source/blender/blenlib/intern/edgehash.c 
b/source/blender/blenlib/intern/edgehash.c
index b4b3f0d..27c5457 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -93,7 +93,7 @@ BLI_INLINE unsigned int edgehash_keyhash(EdgeHash *eh, 
unsigned int v0, unsigned
 {
        BLI_assert(v0 < v1);
 
-       return ((v0 * 39) ^ (v1 * 31)) % eh->nbuckets;
+       return ((v0 * 65) ^ (v1 * 31)) % eh->nbuckets;
 }
 
 /**

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to