Class TiffRational
Namespace: Aspose.Imaging.FileFormats.Tiff
Assembly: Aspose.Imaging.dll (25.8.0)
The tiff rational type.
[JsonObject(MemberSerialization.OptIn)]
public class TiffRationalInheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
TiffRational()
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffRational class.
public TiffRational()TiffRational(uint)
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffRational class.
public TiffRational(uint value)Parameters
value uint
The nominator value.
Remarks
The nominator will be used as the value specified and denominator will be equal 1.
TiffRational(uint, uint)
Initializes a new instance of the Aspose.Imaging.FileFormats.Tiff.TiffRational class.
[JsonConstructor]
public TiffRational(uint nominator, uint denominator)Parameters
nominator uint
The nominator.
denominator uint
The denominator.
Fields
Epsilon
The epsilon for fraction calculation
public const double Epsilon = 1E-06Field Value
Properties
Denominator
Gets the denominator.
public uint Denominator { get; }Property Value
Nominator
Gets the nominator.
public uint 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 TiffRational 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 TiffRational ApproximateFraction(double value)Parameters
value double
The value.
Returns
A rational number having error less than Aspose.Imaging.FileFormats.Tiff.TiffRational.Epsilon.
ApproximateFraction(float, double)
Approximates the provided value to a fraction.
public static TiffRational 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 TiffRational ApproximateFraction(float value)Parameters
value float
The value.
Returns
A rational number having error less than Aspose.Imaging.FileFormats.Tiff.TiffRational.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()
Converts to string.
public override string ToString()Returns
A System.String that represents this instance.