Package org.gvsig.math.intervals
Class IntervalUtils
java.lang.Object
org.gvsig.math.intervals.IntervalUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleroundIntervalDivision(double intervalLength, int numberOfDivisions) Calculates an nice round interval division.
-
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 dividednumberOfDivisions- 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
-