Class IntervalUtils

java.lang.Object
org.gvsig.math.intervals.IntervalUtils

public class IntervalUtils extends Object
  • Constructor Details

    • IntervalUtils

      public IntervalUtils()
  • Method Details

    • roundIntervalDivision

      public static double roundIntervalDivision(double intervalLength, int numberOfDivisions)
      Calculates an nice round interval division. For instance, for intervalLenght = 1100000 and numberOfDivisions=5, the result would be 250000.
      Parameters:
      intervalLength - The full interval to be divided
      numberOfDivisions - The exact number of divisions to perform
      Returns:
      A nice round interval division. The calculated result ensures that the whole interval length is covered by the proposed division, so it always fulfills the following formula: result*numberOfDivisions>=intervalLength