Skip to content

Commit

Permalink
makeDetailsMask() blanksAtEnd (q21e)
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Feb 16, 2024
1 parent 7acc751 commit 8c43d9e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,9 @@ static uint16_t GraphMeterMode_makeDetailsMask(const GraphColorComputeState* pre
distance -= 0.5;
}
distance = ceil(distance);
blanksAtEnd = (uint8_t)(8 - (unsigned int)(int)numDots / 2);
if (blanksAtEnd > (int32_t)distance) {
blanksAtEnd = (uint8_t)(blanksAtEnd - (int32_t)distance);
} else {
blanksAtEnd = 0;
}
unsigned int maxBlanks2 = 8 - (unsigned int)(int)numDots / 2;
maxBlanks2 = MAXIMUM(maxBlanks2, (unsigned int)(int32_t)distance);
blanksAtEnd = (uint8_t)(maxBlanks2 - (unsigned int)(int32_t)distance);
}
assert(blanksAtEnd < 8);

Expand Down

0 comments on commit 8c43d9e

Please sign in to comment.