soiz1 commited on
Commit
de07894
·
1 Parent(s): 1dc7a7b

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -1
index.html CHANGED
@@ -202,7 +202,8 @@ document.addEventListener('DOMContentLoaded', function () {
202
  const percent = Math.min(Math.max(relativeX / rect.width, 0), 1);
203
  let value = min + (max - min) * percent;
204
  value = Math.round(value / step) * step;
205
-
 
206
  // スライダーの値として表示
207
  bubble.textContent = value;
208
 
 
202
  const percent = Math.min(Math.max(relativeX / rect.width, 0), 1);
203
  let value = min + (max - min) * percent;
204
  value = Math.round(value / step) * step;
205
+ value = Number(value.toFixed(4)); //小数点以下を丸める(0.140000000000003などの誤差)
206
+
207
  // スライダーの値として表示
208
  bubble.textContent = value;
209