I am trying to perform broad-phase collision detection with a fixed-grid size approach. Thus, for each entity\'s position: (x,y,z) (each of type float), I need to find which cel
My preferred hashing function for this kind of vector is to rotate the bits of each component by a different constant and XOR them together.
It's very fast, and the bit rotations are helpful to reduce collisions and ensure as much of the key space as possible is used.