public class TiffRational extends Object
The tiff rational type.
Modifier and Type | Field and Description |
---|---|
static double |
Epsilon
The epsilon for fraction calculation
|
Constructor and Description |
---|
TiffRational()
Initializes a new instance of the
TiffRational class. |
TiffRational(long value)
Initializes a new instance of the
TiffRational class. |
TiffRational(long nominator,
long denominator)
Initializes a new instance of the
TiffRational class. |
Modifier and Type | Method and Description |
---|---|
static TiffRational |
approximateFraction(double value)
Approximates the provided value to a fraction.
|
static TiffRational |
approximateFraction(double value,
double epsilon)
Approximates the provided value to a fraction.
|
static TiffRational |
approximateFraction(float value)
Approximates the provided value to a fraction.
|
static TiffRational |
approximateFraction(float value,
double epsilon)
Approximates the provided value to a fraction.
|
boolean |
equals(Object obj)
Determines whether the specified
Object is equal to this instance. |
long |
getDenominator()
Gets the denominator.
|
long |
getNominator()
Gets the nominator.
|
float |
getValue()
Gets the float value.
|
double |
getValueD()
Gets the double value.
|
int |
hashCode()
Returns a hash code for this instance.
|
String |
toString()
Returns a
String that represents this instance. |
public static final double Epsilon
The epsilon for fraction calculation
public TiffRational()
Initializes a new instance of the TiffRational
class.
public TiffRational(long value)
Initializes a new instance of the TiffRational
class.
value
- The nominator value.
public TiffRational(long nominator, long denominator)
Initializes a new instance of the TiffRational
class.
nominator
- The nominator.denominator
- The denominator.public final long getDenominator()
Gets the denominator.
Value: The denominator.public final long getNominator()
Gets the nominator.
Value: The nominator.public final float getValue()
Gets the float value.
Value: The float value.public final double getValueD()
Gets the double value.
Value: The double value.public static TiffRational approximateFraction(double value, double epsilon)
Approximates the provided value to a fraction.
value
- The value.epsilon
- The error allowed.epsilon
.public static TiffRational approximateFraction(double value)
Approximates the provided value to a fraction.
value
- The value.TiffRational.Epsilon
.public static TiffRational approximateFraction(float value, double epsilon)
Approximates the provided value to a fraction.
value
- The value.epsilon
- The error allowed.epsilon
.public static TiffRational approximateFraction(float value)
Approximates the provided value to a fraction.
value
- The value.TiffRational.Epsilon
.public boolean equals(Object obj)
Determines whether the specified Object
is equal to this instance.
Copyright (c) 2008-2019 Aspose Pty Ltd. All Rights Reserved.