From bf8449e050f156d62644d6b8d2753afb1121d066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Mon, 9 Sep 2019 10:32:51 +0200 Subject: [PATCH] set significant figures to 3 --- content/pages/index.html | 2 +- content/scripts/data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/pages/index.html b/content/pages/index.html index f1bb9f59..f13d97fb 100644 --- a/content/pages/index.html +++ b/content/pages/index.html @@ -49,7 +49,7 @@ await dat.excitations.reduce(async (promise,el)=> { await promise; var node = document.createElement("div"); - node.innerHTML= String.raw`${LatexInline[0]} ${el.start.toLaTeX()} \rightarrow ${el.end.toLaTeX()}${LatexInline[1]}, ${LatexInline[0]}${el.Eabs}\:\mathrm{eV}${LatexInline[1]}`; + node.innerHTML= String.raw`${LatexInline[0]} ${el.start.toLaTeX()} \rightarrow ${el.end.toLaTeX()}${LatexInline[1]}, ${LatexInline[0]}${el.Eabs.toPrecision(3)}\:\mathrm{eV}${LatexInline[1]}`; node.hidden=true exPar.appendChild(node); await MathJax.typesetPromise(); diff --git a/content/scripts/data.js b/content/scripts/data.js index 7416a3f8..6d1231f7 100644 --- a/content/scripts/data.js +++ b/content/scripts/data.js @@ -58,7 +58,7 @@ class excitation{ this.Eabs=Eabs; } toString() { - return this.start+ ', ' + this.end +', '+ this.Eabs; + return this.start+ ', ' + this.end +', '+ this.Eabs.toPrecision(3); } }