java.lang.Object
io.github.shimeoki.jfx.rasterization.Ints

public final class Ints extends Object
Class for some operations on integers that are not in the standard Math class.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    confined(int low, int x, int high)
    Returns an integer that is the confined value of x for two bounds.
    static int
    max3(int v1, int v2, int v3)
    Gets a maximum integer out of three values.
    static int
    min3(int v1, int v2, int v3)
    Gets a minumum integer out of three values.

    Methods inherited from class java.lang.Object

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

    • confined

      public static int confined(int low, int x, int high)
      Returns an integer that is the confined value of x for two bounds.

      If x is less than low, then low is returned.

      If x is more than high, then high is returned.

      Otherwise x is returned.

      Parameters:
      low - lower bound
      x - target integer to confine
      high - upper bound
      Returns:
      confined integer
      Since:
      2.0.0
    • min3

      public static int min3(int v1, int v2, int v3)
      Gets a minumum integer out of three values.
      Parameters:
      v1 - first integer
      v2 - second integer
      v3 - third integer
      Returns:
      minimum integer out of three values
      Since:
      2.0.0
    • max3

      public static int max3(int v1, int v2, int v3)
      Gets a maximum integer out of three values.
      Parameters:
      v1 - first integer
      v2 - second integer
      v3 - third integer
      Returns:
      maximum integer out of three values
      Since:
      2.0.0