MCPcopy
hub / github.com/ccxt/ccxt / toFixed

Method toFixed

java/lib/src/main/java/io/github/ccxt/Helpers.java:636–641  ·  view source on GitHub ↗
(Object number, Object decimals)

Source from the content-addressed store, hash-verified

634 }
635
636 public static Object toFixed(Object number, Object decimals) {
637 double n = toDouble(number);
638 int d = toInt(decimals);
639 BigDecimal bd = new BigDecimal(Double.toString(n)).setScale(d, RoundingMode.HALF_UP);
640 return bd.doubleValue();
641 }
642
643 // public static Object callDynamically(Object obj, Object methodName, Object[] args) {
644 // if (args == null) args = new Object[]{};

Callers 15

getDataFunction · 0.45
percentsDoneFunction · 0.45
withdrawMethod · 0.45
customNonceMethod · 0.45
_decimalToPrecisionFunction · 0.45
valueToChecksumMethod · 0.45
withdrawMethod · 0.45
customNonceMethod · 0.45
_decimalToPrecisionFunction · 0.45
valueToChecksumMethod · 0.45
renderOrderBookFunction · 0.45
fmtFunction · 0.45

Calls 3

toDoubleMethod · 0.95
toIntMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected