Package org.esa.snap.core.util.math
Class FracIndex
java.lang.Object
org.esa.snap.core.util.math.FracIndex
The class
FracIndex is a simple representation of
an index with an integral and a fractional component.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FracIndex[]createArray(int length) Creates an array of typeFracIndex[].final voidtruncate()Sets the fractional component to 0.0 if it is less than zero, and to 1.0 if it is greater than unity.
-
Field Details
-
i
public int iThe integral component. -
f
public double fThe fractional component.
-
-
Constructor Details
-
FracIndex
public FracIndex()
-
-
Method Details
-
createArray
Creates an array of typeFracIndex[].- Parameters:
length- the length of the array being created.- Returns:
- the created array.
-
truncate
public final void truncate()Sets the fractional component to 0.0 if it is less than zero, and to 1.0 if it is greater than unity.
-