diff --git a/Sources/Interaction/UI/FPSMonitor/index.js b/Sources/Interaction/UI/FPSMonitor/index.js index a2ed9c04ccd..c696218a508 100644 --- a/Sources/Interaction/UI/FPSMonitor/index.js +++ b/Sources/Interaction/UI/FPSMonitor/index.js @@ -7,9 +7,13 @@ function formatNumbers(n) { const sections = []; let size = n; while (size > 1000) { - sections.push(`000${size % 1000}`.slice(-3)); + sections.push(`000${Math.floor(size) % 1000}`.slice(-3)); size = Math.floor(size / 1000); } + if (size % 1 !== 0) { + // float + size = size.toFixed(6); + } if (size > 0) { sections.push(size); }