10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01:00

set significant figures to 3

This commit is contained in:
Mickaël Véril 2019-09-09 10:32:51 +02:00
parent e476f04011
commit bf8449e050
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@
await dat.excitations.reduce(async (promise,el)=> { await dat.excitations.reduce(async (promise,el)=> {
await promise; await promise;
var node = document.createElement("div"); 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 node.hidden=true
exPar.appendChild(node); exPar.appendChild(node);
await MathJax.typesetPromise(); await MathJax.typesetPromise();

View File

@ -58,7 +58,7 @@ class excitation{
this.Eabs=Eabs; this.Eabs=Eabs;
} }
toString() { toString() {
return this.start+ ', ' + this.end +', '+ this.Eabs; return this.start+ ', ' + this.end +', '+ this.Eabs.toPrecision(3);
} }
} }