summaryrefslogtreecommitdiffstats
path: root/generic/tkScale.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-03-24 20:20:39 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-03-24 20:20:39 (GMT)
commitbd919c12a0d87ab9bf1bd86a114ed66898bbfcd1 (patch)
treeb037286bb5f4f01a4a2172cff4f2ba8db25d4502 /generic/tkScale.c
parent5d23499fac449980d06f4ca3535f02a27a4052a1 (diff)
downloadtk-bd919c12a0d87ab9bf1bd86a114ed66898bbfcd1.zip
tk-bd919c12a0d87ab9bf1bd86a114ed66898bbfcd1.tar.gz
tk-bd919c12a0d87ab9bf1bd86a114ed66898bbfcd1.tar.bz2
Name the TICK_VALUES_DISPLAY_ACCURACY constant
Diffstat (limited to 'generic/tkScale.c')
-rw-r--r--generic/tkScale.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 8118436..c5cdaff 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -904,11 +904,12 @@ ComputeFormat(
leastSigDigit = ScaleDigit(scalePtr->tickInterval);
/*
- * Now add more digits until max error is less than 0.2 intervals
+ * Now add more digits until max error is less than
+ * TICK_VALUES_DISPLAY_ACCURACY intervals
*/
while (MaxTickRoundingError(scalePtr, pow(10, leastSigDigit))
- > fabs(0.2 * scalePtr->tickInterval)) {
+ > fabs(TICK_VALUES_DISPLAY_ACCURACY * scalePtr->tickInterval)) {
--leastSigDigit;
}
numDigits = 1 + mostSigDigit - leastSigDigit;