Skip to content

Commit

Permalink
number_to_decimal only uses given precision if it's finite
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Mar 6, 2024
1 parent 5575f10 commit 81ffc88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/scripts/jme.js
Original file line number Diff line number Diff line change
Expand Up @@ -3002,7 +3002,7 @@ var TNum = types.TNum = function(num) {

function number_to_decimal(n, precisionType, precision) {
var dp = 15;
if(precisionType == 'dp') {
if(precisionType == 'dp' && isFinite(precision)) {
dp = Math.max(dp, -precision);
}
var re,im;
Expand Down

0 comments on commit 81ffc88

Please sign in to comment.