Skip to content

Commit

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

// Paint cells to the buffer
if (hasPartialTopCell && prev.nItemsPainted == topCellItem) {
// Re-calculate the remainder with the top cell area included
if (rem > 0.0) {
// Has extra cell won from the largest remainder method
rem = area;
} else {
// Did not win extra cell from the remainder
rem = MINIMUM(area, topCellArea);
if (nCells > 0 && new.nCellsPainted <= nCellsToPaint) {
if (hasPartialTopCell && prev.nItemsPainted == topCellItem) {
// Re-calculate the remainder with the top cell area included
if (rem > 0.0) {
// Has extra cell won from the largest remainder method
rem = area;
} else {
// Did not win extra cell from the remainder
rem = MINIMUM(area, topCellArea);
}
rem -= (int)rem;
}
rem -= (int)rem;
}

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

0 comments on commit bd4d972

Please sign in to comment.