From a61ad8170188f06121c8c19775ebd436e6a57635 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Fri, 9 Feb 2024 20:56:02 +0800 Subject: [PATCH] makeDetailsMask optimization (j12) --- Meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meter.c b/Meter.c index 369e4fb8a..e1a20695a 100644 --- a/Meter.c +++ b/Meter.c @@ -527,7 +527,7 @@ static uint16_t GraphMeterMode_makeDetailsMask(const GraphColorComputeState* pre // In case of a tie, display the dot at lower position of the graph, // i.e. MSB of the "details" data. double fraction = maxBlanks - (int)maxBlanks; - double distance = maxBlanks + ((double)(int)prev->nCellsPainted - prevTopPoint) * 8.0 + (1.0 - fraction) * 0.5; + double distance = maxBlanks + ((double)(int)prev->nCellsPainted - prevTopPoint) * 8.0 + (0.5 - fraction * 0.5); if (distance <= 0.0) distance = 0.0;