Skip to content

Commit

Permalink
rem compute code order (j1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Feb 8, 2024
1 parent 8d7fdff commit b55657c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,11 +801,11 @@ static void GraphMeterMode_computeColors(Meter* this, const GraphDrawContext* co
rem -= (int)rem;
}

bool isItemOnEdge = (prev.nCellsPainted == 0 || new.nCellsPainted == nCellsToPaint);
if (isItemOnEdge && area < (0.125 * dotAlignment))
rem = (0.125 * dotAlignment);

if (nCells > 0 && new.nCellsPainted <= nCellsToPaint) {
bool isItemOnEdge = (prev.nCellsPainted == 0 || new.nCellsPainted == nCellsToPaint);
if (isItemOnEdge && area < (0.125 * dotAlignment))
rem = (0.125 * dotAlignment);

double prevTopPoint = (prev.valueSum / scaledTotal) * (double)(int)graphHeight;
int blanksAtTopCellArg = (new.nCellsPainted == nCellsToPaint) ? (int)blanksAtTopCell : -1;
uint16_t mask = GraphMeterMode_makeDetailsMask(&prev, &new, prevTopPoint, rem, blanksAtTopCellArg);
Expand Down

0 comments on commit b55657c

Please sign in to comment.