Skip to content

Commit 538a306

Browse files
authored
fix: Fix indexing logic of GetterHeatmapColMaj::operator() (epezent#511)
Change mod from Cols to Rows
1 parent 5e5e884 commit 538a306

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

implot_items.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,8 +2327,8 @@ struct GetterHeatmapColMaj {
23272327
{ }
23282328
template <typename I> IMPLOT_INLINE RectC operator()(I idx) const {
23292329
double val = (double)Values[idx];
2330-
const int r = idx % Cols;
2331-
const int c = idx / Cols;
2330+
const int r = idx % Rows;
2331+
const int c = idx / Rows;
23322332
const ImPlotPoint p(XRef + HalfSize.x + c*Width, YRef + YDir * (HalfSize.y + r*Height));
23332333
RectC rect;
23342334
rect.Pos = p;

0 commit comments

Comments
 (0)