# | Line 140 | Line 140 | void GofXyz::collectHistogram(StuntDouble* sd1, StuntD | |
---|---|---|
140 | int ybin = (y + halfLen_) / deltaR_; | |
141 | int zbin = (z + halfLen_) / deltaR_; | |
142 | ||
143 | < | if (xbin < nRBins_ && ybin < nRBins_ && zbin < nRBins_) { |
144 | < | ++histogram_[x][y][z]; |
143 | > | if (xbin < nRBins_ && xbin >=0 && |
144 | > | ybin < nRBins_ && ybin >= 0 && |
145 | > | zbin < nRBins_ && zbin >=0 ) { |
146 | > | ++histogram_[xbin][ybin][zbin]; |
147 | } | |
148 | ||
149 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |