How to set a spatial hash grids origin?

actually, the math is wrong. The formula you were trying to use is to get the midpoint between two points, so you were supposed to add, not subtract their vectors