mirror of
https://github.com/dnlbauer/WHAM.git
synced 2026-09-11 14:45:32 +00:00
fix an IOB when a timeseries value is exactly on the upper histogram boundary
This commit is contained in:
@@ -103,7 +103,7 @@ fn flat_index(indeces: &Vec<usize>, lengths: &Vec<usize>) -> usize {
|
|||||||
// returns true if the values are inside the histogram boundaries defined by cfg
|
// returns true if the values are inside the histogram boundaries defined by cfg
|
||||||
fn is_in_hist_boundaries(values: &[f64], cfg: &Config) -> bool {
|
fn is_in_hist_boundaries(values: &[f64], cfg: &Config) -> bool {
|
||||||
for dimen in 0..cfg.dimens {
|
for dimen in 0..cfg.dimens {
|
||||||
if values[dimen] < cfg.hist_min[dimen] || values[dimen] > cfg.hist_max[dimen] {
|
if values[dimen] < cfg.hist_min[dimen] || values[dimen] >= cfg.hist_max[dimen] {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user