Fix CM.Disp.Beautify failing when num=0

This commit is contained in:
Daniel van Noord
2020-12-05 14:10:42 +01:00
parent 9dc95d760a
commit e0915bc307
2 changed files with 2 additions and 2 deletions

View File

@@ -1273,7 +1273,7 @@ CM.Disp.Beautify = function(num, frac, forced) {
answer += 'E+' + (timesTenToPowerThree * 3); answer += 'E+' + (timesTenToPowerThree * 3);
} }
} }
if (answer == '') { if (answer === '') {
console.log("Could not beautify number with CM.Disp.Beautify"); console.log("Could not beautify number with CM.Disp.Beautify");
answer = CM.Backup.Beautify(num, frac); answer = CM.Backup.Beautify(num, frac);
} }

View File

@@ -387,7 +387,7 @@ CM.Disp.Beautify = function(num, frac, forced) {
answer += 'E+' + (timesTenToPowerThree * 3); answer += 'E+' + (timesTenToPowerThree * 3);
} }
} }
if (answer == '') { if (answer === '') {
console.log("Could not beautify number with CM.Disp.Beautify"); console.log("Could not beautify number with CM.Disp.Beautify");
answer = CM.Backup.Beautify(num, frac); answer = CM.Backup.Beautify(num, frac);
} }