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

Method validateScale

core/src/main/java/io/questdb/std/Decimal256.java:1991–1995  ·  view source on GitHub ↗

Validates that the scale is within the allowed range. @param scale the scale to validate @throws NumericException if scale is invalid

(int scale)

Source from the content-addressed store, hash-verified

1989 * @throws NumericException if scale is invalid
1990 */
1991 private static void validateScale(int scale) {
1992 if (scale < 0 || scale > MAX_SCALE) {
1993 throw NumericException.instance().put("Invalid scale: " + scale);
1994 }
1995 }
1996
1997 private int compareTo0(long bHH, long bHL, long bLH, long bLL) {
1998 return compare(hh, hl, lh, ll, bHH, bHL, bLH, bLL);

Callers 8

Decimal256Method · 0.95
divideMethod · 0.95
fromBigDecimalMethod · 0.95
fromDoubleMethod · 0.95
fromLongMethod · 0.95
multiplyMethod · 0.95
ofLongMethod · 0.95
roundMethod · 0.95

Calls 2

instanceMethod · 0.95
putMethod · 0.65

Tested by

no test coverage detected