MCPcopy Create free account
hub / github.com/BaseXdb/basex / round

Method round

basex-core/src/main/java/org/basex/query/value/item/Dec.java:128–133  ·  view source on GitHub ↗
(final int prec, final RoundMode mode)

Source from the content-addressed store, hash-verified

126 }
127
128 @Override
129 public Dec round(final int prec, final RoundMode mode) {
130 if(value.signum() == 0) return this;
131 final BigDecimal v = round(value, prec, mode);
132 return v.equals(value) ? this : get(v);
133 }
134
135 /**
136 * Returns a rounded value.

Callers 4

roundMethod · 0.95
roundMethod · 0.95
roundMethod · 0.95
roundMethod · 0.95

Calls 5

getMethod · 0.95
addMethod · 0.65
getMethod · 0.65
equalsMethod · 0.45
compareToMethod · 0.45

Tested by

no test coverage detected