Skip to content

Commit

Permalink
makeDetailsMask() (int)prev->nCellsPainted (q11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Feb 13, 2024
1 parent 45e913b commit a484ce9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,14 +513,14 @@ static uint16_t GraphMeterMode_makeDetailsMask(const GraphColorComputeState* pre
assert(blanksAtTopCell < 8);
blanksAtEnd = (uint8_t)blanksAtTopCell;
roundsUpInAscii = true;
} else if (prev->nCellsPainted == 0 || prevTopPoint <= prev->nCellsPainted) {
} else if (prev->nCellsPainted == 0 || prevTopPoint <= (double)(int)prev->nCellsPainted) {
blanksAtEnd = (uint8_t)maxBlanks % 8;
} else {
// Unlike other conditions, this one rounds to nearest for visual reason.
// In case of a tie, display the dot at lower position of the graph,
// i.e. MSB of the "details" data.

double distance = prevTopPoint - prev->nCellsPainted;
double distance = prevTopPoint - (double)(int)prev->nCellsPainted;
distance = distance + rem * 0.5;

// Tiebreaking direction that may be needed in the ASCII display mode.
Expand Down

0 comments on commit a484ce9

Please sign in to comment.