Class RangeUtils

java.lang.Object
org.carrot2.util.RangeUtils

public class RangeUtils
extends Object
A helper class for performing various calculations for integer and double ranges.
  • Constructor Summary

    Constructors 
    Constructor Description
    RangeUtils()  
  • Method Summary

    Modifier and Type Method Description
    static double getDoubleMajorTicks​(double min, double max)
    Calculates the spacing between major (primary) "ticks" of a slider.
    static double getDoubleMinorTicks​(double min, double max)
    Calculates the spacing between minor (secondary) "ticks" of a slider.
    static int getIntMajorTicks​(int min, int max)
    Calculates the spacing between major (primary) "ticks" of a slider.
    static int getIntMinorTicks​(int min, int max)
    Calculates the spacing between minor (secondary) "ticks" of a slider.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • getIntMinorTicks

      public static int getIntMinorTicks​(int min, int max)
      Calculates the spacing between minor (secondary) "ticks" of a slider.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
    • getIntMajorTicks

      public static int getIntMajorTicks​(int min, int max)
      Calculates the spacing between major (primary) "ticks" of a slider.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
    • getDoubleMinorTicks

      public static double getDoubleMinorTicks​(double min, double max)
      Calculates the spacing between minor (secondary) "ticks" of a slider.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range
    • getDoubleMajorTicks

      public static double getDoubleMajorTicks​(double min, double max)
      Calculates the spacing between major (primary) "ticks" of a slider.
      Parameters:
      min - minimum value of the range
      max - maximum value of the range