diff --git a/static/js/floatUtils.js b/static/js/floatUtils.js index ae068a64..841e0623 100644 --- a/static/js/floatUtils.js +++ b/static/js/floatUtils.js @@ -1,6 +1,7 @@ class stringFloat{ - constructor(value) { + constructor(value,printNaN=true) { this.string=value + this.printNaN=printNaN } get Value(){ return parseFloat(this.string) @@ -9,10 +10,10 @@ class stringFloat{ return this.Value; } toString(){ - if (checkFloat(this.string)) { - return this.Value - } else { + if (checkFloat(this.string) && this.printNaN) { return this.string + } else { + return NaN.toString() } } }