kaleido
Class Rational
java.lang.Object
kaleido.Rational
public class Rational
- extends Object
Class Rational
- Version:
- $Id: Rational.java,v 1.75 2007/02/09 20:07:44 rl Exp $
- Author:
- Zvi Har’El
- See Also:
- Class source code
|
Constructor Summary |
(package private) |
Rational(double x)
Find the numerator and the denominator using the Euclidean
algorithm. |
private |
Rational(int numerator,
int denominator)
Private Constructor. |
numerator
int numerator
denominator
int denominator
ZERO
static final Rational ZERO
Rational
private Rational(int numerator,
int denominator)
- Private Constructor.
Rational
Rational(double x)
- Find the numerator and the denominator using the Euclidean
algorithm. The resulting rational is reduced.
doubleValue
double doubleValue()
compl
Rational compl()
isCompl
boolean isCompl(Rational r)
isInteger
boolean isInteger()
isFinite
boolean isFinite()
isStar
boolean isStar()
isValid
boolean isValid()
equals
boolean equals(Rational r)
equals
boolean equals(int i)
toString
public String toString()
- Overrides:
toString in class Object
equals
boolean equals(double x)
compl
static double compl(double x)
numerator
static int numerator(double x)
denominator
static int denominator(double x)
isInteger
static boolean isInteger(double x)
isStar
static boolean isStar(double x)
toString
static String toString(double x)
Copyright ©
Zvi Har’El
$Date: 2007/10/15 13:50:30$