Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Groves
af7ae958d5 introduce fix for issue 1105 (https://github.com/SheetJS/js-xlsx/issues/1105) 2018-05-15 10:34:27 +01:00
3 changed files with 3 additions and 3 deletions

@ -310,7 +310,7 @@ function hashq(str/*:string*/)/*:string*/ {
}
return o;
}
function rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return ""+(Math.round(val * dd)/dd); }
function rnd(val/*:number*/, d/*:number*/)/*:string*/ { return ""+(+(Math.round(val + "e+" + d) + "e-" + d)); }
function dec(val/*:number*/, d/*:number*/)/*:number*/ {
if (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {
return 0;

@ -506,7 +506,7 @@ function hashq(str/*:string*/)/*:string*/ {
}
return o;
}
function rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return ""+(Math.round(val * dd)/dd); }
function rnd(val/*:number*/, d/*:number*/)/*:string*/ { return ""+(+(Math.round(val + "e+" + d) + "e-" + d)); }
function dec(val/*:number*/, d/*:number*/)/*:number*/ {
if (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {
return 0;

2
xlsx.js generated

@ -481,7 +481,7 @@ function hashq(str) {
}
return o;
}
function rnd(val, d) { var dd = Math.pow(10,d); return ""+(Math.round(val * dd)/dd); }
function rnd(val, d) { return ""+(+(Math.round(val + "e+" + d) + "e-" + d)); }
function dec(val, d) {
if (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {
return 0;