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

Method saturatedMultiply

output/java_guava/1.4.19/IntMath.java:578–581  ·  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

576 */
577
578 @Beta
579 public static int saturatedMultiply(int a, int b) {
580 return Ints.saturatedCast((long) a * b);
581 }
582
583 /**
584 * 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