Skip to content

Commit

Permalink
fix: Fix indexing logic of GetterHeatmapColMaj::operator() (#511)
Browse files Browse the repository at this point in the history
Change mod from Cols to Rows
  • Loading branch information
cwahn authored Sep 26, 2023
1 parent 5e5e884 commit 538a306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions implot_items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2327,8 +2327,8 @@ struct GetterHeatmapColMaj {
{ }
template <typename I> IMPLOT_INLINE RectC operator()(I idx) const {
double val = (double)Values[idx];
const int r = idx % Cols;
const int c = idx / Cols;
const int r = idx % Rows;
const int c = idx / Rows;
const ImPlotPoint p(XRef + HalfSize.x + c*Width, YRef + YDir * (HalfSize.y + r*Height));
RectC rect;
rect.Pos = p;
Expand Down

0 comments on commit 538a306

Please sign in to comment.