Table of Contents

Class TiffRational

Namespace
Aspose.Imaging.FileFormats.Tiff
Assembly
Aspose.Imaging.dll

The tiff rational type.

public class TiffRational
Inheritance
TiffRational
Inherited Members

Constructors

TiffRational()

Initializes a new instance of the TiffRational class.

public TiffRational()

TiffRational(uint)

Initializes a new instance of the 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 TiffRational class.

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

Field Value

double

Properties

Denominator

Gets the denominator.

public uint Denominator { get; }

Property Value

uint

The denominator.

Nominator

Gets the nominator.

public uint Nominator { get; }

Property Value

uint

The nominator.

Value

Gets the float value.

public float Value { get; }

Property Value

float

The float value.

ValueD

Gets the double value.

public double ValueD { get; }

Property Value

double

The double value.

Methods

ApproximateFraction(double)

Approximates the provided value to a fraction.

public static TiffRational ApproximateFraction(double value)

Parameters

value double

The value.

Returns

TiffRational

A rational number having error less than Epsilon.

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

TiffRational

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

TiffRational

A rational number having error less than 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

TiffRational

A rational number having error less than epsilon.

Equals(object)

Determines whether the specified object, is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified 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()

Converts to string.

public override string ToString()

Returns

string

A string that represents this instance.