From 381a591d9507725003b3b1bca5d97d9184f6acb0 Mon Sep 17 00:00:00 2001 From: miguel <31931809+miguelvaca@users.noreply.github.com> Date: Tue, 15 Feb 2022 09:27:06 +1100 Subject: [PATCH] Increase precision for tooltip frequency display to avoid rounding errors. --- magloop.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magloop.html b/magloop.html index 346f083..53752cd 100644 --- a/magloop.html +++ b/magloop.html @@ -1786,7 +1786,7 @@ title: function(context) { var value = context[0].parsed.x; var lut = {0.1357:'2200', 0.1378:'2200', 0.472:'600', 0.479:'600', 1.8:'160', 1.875:'160', 3.5:'80', 3.8:'80', 5.3:'60', 5.4:'60', 7.0:'40', 7.3:'40', 10.1:'30', 10.15:'30', 14.0:'20', 14.35:'20', 18.068:'18', 18.168:'18', 21.0:'15', 21.45:'15', 24.89:'12', 24.99:'12', 28.0:'10', 29.7:'10', 35.0:'', 40.0:'', 45.0:'', 50.0:'6', 52.0:'6', 54.0:'6'}; - var label = '' + value.toPrecision(3).toString() + ' MHz'; + var label = '' + value.toPrecision(4).toString() + ' MHz'; if(lut[value]) { label += ' ('; label += lut[value] + ' m)';