Package it.tidalwave.image
Class Rational
- java.lang.Object
-
- java.lang.Number
-
- it.tidalwave.image.Rational
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public class Rational extends java.lang.Number
- Author:
- Fabrizio Giudici
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Rational(double d)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
byteValue()
Rational
divide(double det)
double
doubleValue()
float
floatValue()
Rational
getReciprocal()
int
intValue()
boolean
isInteger()
long
longValue()
short
shortValue()
java.lang.String
toString()
-
-
-
Method Detail
-
doubleValue
public final double doubleValue()
- Specified by:
doubleValue
in classjava.lang.Number
-
floatValue
public final float floatValue()
- Specified by:
floatValue
in classjava.lang.Number
-
byteValue
public final byte byteValue()
- Overrides:
byteValue
in classjava.lang.Number
-
intValue
public final int intValue()
- Specified by:
intValue
in classjava.lang.Number
-
longValue
public final long longValue()
- Specified by:
longValue
in classjava.lang.Number
-
shortValue
public final short shortValue()
- Overrides:
shortValue
in classjava.lang.Number
-
divide
@Nonnull public final Rational divide(double det)
- Parameters:
det
-- Returns:
-
getReciprocal
@Nonnull public final Rational getReciprocal()
-
isInteger
public final boolean isInteger()
-
toString
@Nonnull public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-