public class RationalNumber
extends java.lang.Number
Constructor and Description |
---|
RationalNumber(int numerator,
int divisor) |
Modifier and Type | Method and Description |
---|---|
double |
doubleValue() |
float |
floatValue() |
int |
intValue() |
long |
longValue() |
RationalNumber |
negate() |
java.lang.String |
toDisplayString() |
java.lang.String |
toString() |
static RationalNumber |
valueOf(double value)
Calculate rational number using successive approximations.
|
public RationalNumber negate()
public double doubleValue()
doubleValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDisplayString()
public static RationalNumber valueOf(double value)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"