Class TiffSRational

Class TiffSRational

Namespace: Aspose.Imaging.FileFormats.Tiff
Assembly: Aspose.Imaging.dll (25.2.0)

The tiff rational type.

[JsonObject(MemberSerialization.OptIn)]
public class TiffSRational

Inheritance

objectTiffSRational

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-06

Field Value

double

Properties

Denominator

Gets the denominator.

public int Denominator { get; }

Property Value

int

Nominator

Gets the nominator.

public int Nominator { get; }

Property Value

int

Value

Gets the float value.

public float Value { get; }

Property Value

float

ValueD

Gets the double value.

public double ValueD { get; }

Property Value

double

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

TiffSRational

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

TiffSRational

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

TiffSRational

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

TiffSRational

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

bool

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

int

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

string

A System.String that represents this instance.