Class RationalNumber
- java.lang.Object
-
- java.lang.Number
-
- org.apache.commons.imaging.common.RationalNumber
-
- All Implemented Interfaces:
Serializable
public class RationalNumber extends Number
Rational number, as used by the TIFF image format.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RationalNumber(int numerator, int divisor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue()
float
floatValue()
int
intValue()
long
longValue()
RationalNumber
negate()
String
toDisplayString()
String
toString()
static RationalNumber
valueOf(double value)
Calculate rational number using successive approximations.-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
negate
public RationalNumber negate()
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classNumber
-
toDisplayString
public String toDisplayString()
-
valueOf
public static RationalNumber valueOf(double value)
Calculate rational number using successive approximations.
-
-