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 bytebyteValue()Rationaldivide(double det)doubledoubleValue()floatfloatValue()RationalgetReciprocal()intintValue()booleanisInteger()longlongValue()shortshortValue()java.lang.StringtoString()
-
-
-
Method Detail
-
doubleValue
public final double doubleValue()
- Specified by:
doubleValuein classjava.lang.Number
-
floatValue
public final float floatValue()
- Specified by:
floatValuein classjava.lang.Number
-
byteValue
public final byte byteValue()
- Overrides:
byteValuein classjava.lang.Number
-
intValue
public final int intValue()
- Specified by:
intValuein classjava.lang.Number
-
longValue
public final long longValue()
- Specified by:
longValuein classjava.lang.Number
-
shortValue
public final short shortValue()
- Overrides:
shortValuein 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:
toStringin classjava.lang.Object
-
-