Class Maths

java.lang.Object
dev.failsafe.internal.util.Maths

public final class Maths extends Object
Misc math utilities.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    add(long a, long b)
    Returns the sum of a and b else Long.MAX_VALUE if the sum would otherwise overflow.
    static long
    roundDown(long input, long interval)
    Returns the input rounded down to the nearest interval.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Maths

      private Maths()
  • Method Details

    • add

      public static long add(long a, long b)
      Returns the sum of a and b else Long.MAX_VALUE if the sum would otherwise overflow.
    • roundDown

      public static long roundDown(long input, long interval)
      Returns the input rounded down to the nearest interval.