MCPcopy Create free account
hub / github.com/questdb/questdb / rescale0

Method rescale0

core/src/main/java/io/questdb/std/Decimal128.java:1648–1659  ·  view source on GitHub ↗
(int resultScale)

Source from the content-addressed store, hash-verified

1646 }
1647
1648 private void rescale0(int resultScale) {
1649 int scaleUp = resultScale - this.scale;
1650 boolean isNegative = isNegative();
1651 if (isNegative) {
1652 negate();
1653 }
1654 multiplyByPowerOf10InPlace(scaleUp);
1655 if (isNegative) {
1656 negate();
1657 }
1658 this.scale = resultScale;
1659 }
1660
1661 /**
1662 * Check if addition resulted in a carry

Callers 3

moduloMethod · 0.95
rescaleMethod · 0.95
addMethod · 0.45

Calls 3

isNegativeMethod · 0.95
negateMethod · 0.95

Tested by

no test coverage detected