Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for saturatedSubtract (0.05 sec)

  1. guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @SuppressWarnings("ShortCircuitBoolean")
      public static long saturatedSubtract(long a, long b) {
        long naiveDifference = a - b;
        if ((a ^ b) >= 0 | (a ^ naiveDifference) >= 0) {
          // If a and b have the same signs or a has the same sign as the result then there was no
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 03 21:01:09 UTC 2025
    - 46.8K bytes
    - Viewed (0)
Back to top