Unverified Commit 007ab83d authored by Dirtyworker's avatar Dirtyworker Committed by GitHub
Browse files

Fix bug in CpuNeighborList::Voxels::getVoxelIndex() (#4144)

parent 806e79c5
......@@ -157,7 +157,7 @@ public:
yperiodic = location[1]-periodicBoxVectors[2][1]*scale2;
zperiodic = location[2]-periodicBoxVectors[2][2]*scale2;
float scale1 = floorf(yperiodic*recipBoxSize[1]);
yperiodic -= periodicBoxVectors[1][0]*scale1;
yperiodic -= periodicBoxVectors[1][1]*scale1;
}
int y = max(0, min(ny-1, int(floorf(yperiodic / voxelSizeY))));
int z = max(0, min(nz-1, int(floorf(zperiodic / voxelSizeZ))));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment