Skip to content

Commit

Permalink
fix overlap sign error
Browse files Browse the repository at this point in the history
  • Loading branch information
Cleveland committed Aug 27, 2021
1 parent 1dc4122 commit b41b77c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kde/quick_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,11 @@ auto get_window_bin = [](auto spherical, const auto dim, const auto &grid_bins,
double loc = location[d];
// transform location for zero theta overshoot
if (spherical && d == 1 && window_max[d] > 2.0 * rtt_units::PI &&
location[d] < window_max[d] - 2.0 * rtt_units::PI)
location[d] < (window_max[d] - 2.0 * rtt_units::PI))
loc += 2.0 * rtt_units::PI;
// transform location for zero theta overshoot
if (spherical && d == 1 && window_min[d] < 0 &&
location[d] > 2.0 * rtt_units::PI - window_min[d])
location[d] > (2.0 * rtt_units::PI + window_min[d]))
loc -= 2.0 * rtt_units::PI;
const double bin_value =
static_cast<double>(grid_bins[d]) * (loc - window_min[d]) / (window_max[d] - window_min[d]);
Expand Down

0 comments on commit b41b77c

Please sign in to comment.