Class TiffSRational
Namespace: Aspose.Imaging.FileFormats.Tiff
Assembly: Aspose.Imaging.dll (25.8.0)
The tiff rational type.
[JsonObject(MemberSerialization.OptIn)]
public class TiffSRationalInheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
TiffSRational()
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffSRational class.
public TiffSRational()TiffSRational(int)
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffSRational class.
public TiffSRational(int value)Parameters
value int
The value.
TiffSRational(int, int)
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffSRational class.
[JsonConstructor]
public TiffSRational(int nominator, int denominator)Parameters
nominator int
The nominator.
denominator int
The denominator.
Fields
Epsilon
The epsilon for fraction calculation
public const double Epsilon = 1E-06Field Value
Properties
Denominator
Gets the denominator.
public int Denominator { get; }Property Value
Nominator
Gets the nominator.
public int Nominator { get; }Property Value
Value
Gets the float value.
public float Value { get; }Property Value
ValueD
Gets the double value.
public double ValueD { get; }Property Value
Methods
ApproximateFraction(double, double)
Approximates the provided value to a fraction.
public static TiffSRational ApproximateFraction(double value, double epsilon)Parameters
value double
The value.
epsilon double
The error allowed.
Returns
A rational number having error less than epsilon.
ApproximateFraction(double)
Approximates the provided value to a fraction.
public static TiffSRational ApproximateFraction(double value)Parameters
value double
The value.
Returns
A rational number having error less than Aspose.Imaging.FileFormats.Tiff.TiffSRational.Epsilon.
ApproximateFraction(float, double)
Approximates the provided value to a fraction.
public static TiffSRational ApproximateFraction(float value, double epsilon)Parameters
value float
The value.
epsilon double
The error allowed.
Returns
A rational number having error less than epsilon.
ApproximateFraction(float)
Approximates the provided value to a fraction.
public static TiffSRational ApproximateFraction(float value)Parameters
value float
The value.
Returns
A rational number having error less than Aspose.Imaging.FileFormats.Tiff.TiffSRational.Epsilon.
Equals(object)
Determines whether the specified System.Object is equal to this instance.
public override bool Equals(object obj)Parameters
obj object
The System.Object to compare with this instance.
Returns
true if the specified System.Object is equal to this instance; otherwise, false.
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
ToString()
Returns a System.String that represents this instance.
public override string ToString()Returns
A System.String that represents this instance.