MCPcopy Create free account
hub / github.com/antlr/codebuff / saturatedMultiply

Method saturatedMultiply

output/java_guava/1.4.18/IntMath.java:583–586  ·  view source on GitHub ↗

Returns the product of a and b unless it would overflow or underflow in which case Integer.MAX_VALUE or Integer.MIN_VALUE is returned, respectively. @since 20.0

(int a, int b)

Source from the content-addressed store, hash-verified

581 */
582
583 @Beta
584 public static int saturatedMultiply(int a, int b) {
585 return Ints.saturatedCast((long) a * b);
586 }
587
588 /**
589 * Returns the {@code b} to the {@code k}th power, unless it would overflow or underflow in which

Callers 1

saturatedPowMethod · 0.95

Calls 1

saturatedCastMethod · 0.95

Tested by

no test coverage detected