public class TiffSRational extends Object
The tiff rational type.
| Modifier and Type | Field and Description |
|---|---|
static double |
EPSILON
The epsilon for fraction calculation
|
| Constructor and Description |
|---|
TiffSRational()
Initializes a new instance of the
TiffSRational class. |
TiffSRational(int value)
Initializes a new instance of the
TiffRational class. |
TiffSRational(int nominator,
int denominator)
Initializes a new instance of the
TiffSRational class. |
| Modifier and Type | Method and Description |
|---|---|
static TiffSRational |
approximateFraction(double value)
Approximates the provided value to a fraction.
|
static TiffSRational |
approximateFraction(double value,
double epsilon)
Approximates the provided value to a fraction.
|
static TiffSRational |
approximateFraction(float value)
Approximates the provided value to a fraction.
|
static TiffSRational |
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. |
int |
getDenominator()
Gets the denominator.
|
int |
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
System.String that represents this instance. |
public static final double EPSILON
The epsilon for fraction calculation
public TiffSRational()
Initializes a new instance of the TiffSRational class.
public TiffSRational(int value)
Initializes a new instance of the TiffRational class.
value - The nominator value.
The nominator will be used as the value specified and denominator will be equal 1.
public TiffSRational(int nominator,
int denominator)
Initializes a new instance of the TiffSRational class.
nominator - The nominator.denominator - The denominator.public static TiffSRational approximateFraction(double value, double epsilon)
Approximates the provided value to a fraction.
value - The value.epsilon - The error allowed.epsilon.public static TiffSRational approximateFraction(double value)
Approximates the provided value to a fraction.
value - The value.Epsilon.public static TiffSRational approximateFraction(float value, double epsilon)
Approximates the provided value to a fraction.
value - The value.epsilon - The error allowed.epsilon.public static TiffSRational approximateFraction(float value)
Approximates the provided value to a fraction.
value - The value.Epsilon.public int getDenominator()
Gets the denominator.
Value: The denominator.public int getNominator()
Gets the nominator.
Value: The nominator.public float getValue()
Gets the float value.
Value: The float value.public double getValueD()
Gets the double value.
Value: The double value.public String toString()
Returns a System.String that represents this instance.
public boolean equals(Object obj)
Determines whether the specified Object is equal to this instance.
Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.