Returns the difference 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)
| 569 | */ |
| 570 | |
| 571 | @Beta |
| 572 | public static int saturatedSubtract(int a, int b) { |
| 573 | return Ints.saturatedCast((long) a - b); |
| 574 | } |
| 575 | |
| 576 | /** |
| 577 | * Returns the product of {@code a} and {@code b} unless it would overflow or underflow in which |
nothing calls this directly
no test coverage detected