fix: incorrect toFixed behavior
This commit is contained in:
parent
71b40240c0
commit
d6ede0b404
@ -91,6 +91,7 @@ public class NumberLib {
|
|||||||
var digits = args.getInt(0, 0);
|
var digits = args.getInt(0, 0);
|
||||||
|
|
||||||
var nf = NumberFormat.getNumberInstance();
|
var nf = NumberFormat.getNumberInstance();
|
||||||
|
nf.setMinimumFractionDigits(digits);
|
||||||
nf.setMaximumFractionDigits(digits);
|
nf.setMaximumFractionDigits(digits);
|
||||||
|
|
||||||
return nf.format(args.getDouble(-1));
|
return nf.format(args.getDouble(-1));
|
||||||
|
Loading…
Reference in New Issue
Block a user