Skip to content

Commit

Permalink
findTopCellItem() optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Jan 27, 2024
1 parent 79a1e75 commit 03777d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static uint8_t GraphMeterMode_findTopCellItem(const Meter* this, double scaledTo
double topPoint = (valueSum / scaledTotal) * (double)(int)graphHeight;
double area = (value / scaledTotal) * (double)(int)graphHeight;

if (topPoint - (double)(int)topCell > 0.0) {
if (topPoint > (double)(int)topCell) {
if (area > topPoint - (double)(int)topCell)
area = topPoint - (double)(int)topCell;

Expand Down

0 comments on commit 03777d0

Please sign in to comment.