Class Integers

java.lang.Object
civitas.celestis.math.integer.Integers

public final class Integers extends Object
Contains utilities related to BigIntegers.
  • Method Details

    • clamp

      @Nonnull public static BigInteger clamp(@Nonnull BigInteger val, @Nonnull BigInteger min, @Nonnull BigInteger max)
      Clamps the provided value val to respect the range of [min, max].
      Parameters:
      val - The value of which to clamp
      min - The minimum allowed value (inclusive)
      max - The maximum allowed value (inclusive)
      Returns:
      The clamped value