FIURational Structure

FreeImage.NET

FIURational Structure
The FIURational structure represents a fraction via two UInt32 instances which are interpreted as numerator and denominator.

Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
[SerializableAttribute]
public struct FIURational : IConvertible, 
	IComparable, IFormattable, IComparable<FIURational>, IEquatable<FIURational>

The FIURational type exposes the following members.

Constructors
  NameDescription
Public methodFIURational(Decimal)
Initializes a new instance based on the specified parameters.
Public methodFIURational(FITAG)
Initializes a new instance based on the specified parameters.
Public methodFIURational(UInt32, UInt32)
Initializes a new instance based on the specified parameters.
Top
Properties
  NameDescription
Public propertyDenominator
The denominator of the fraction.
Public propertyIsInteger
Returns whether the fraction is representing an integer value.
Public propertyNumerator
The numerator of the fraction.
Top
Methods
  NameDescription
Public methodCompareTo(Object)
Compares this instance with a specified Object.
Public methodCompareTo(FIURational)
Compares this instance with a specified FIURational object.
Public methodEquals(Object)
Tests whether the specified object is a FIURational structure and is equivalent to this FIURational structure.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(FIURational)
Tests whether the specified FIURational structure is equivalent to this FIURational structure.
Public methodGetHashCode
Returns a hash code for this FIURational structure.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Converts the numeric value of the FIURational object to its equivalent string representation.
(Overrides ValueTypeToString.)
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Public methodTruncate
Returns the truncated value of the fraction.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Standard implementation of the operator.
Public operatorStatic memberDecrement
Standard implementation of the operator.
Public operatorStatic memberDivision
Standard implementation of the operator.
Public operatorStatic memberEquality
Standard implementation of the operator.
Public operatorStatic member(Boolean to FIURational)
Converts the value of a Boolean structure to a FIURational structure.
Public operatorStatic member(Decimal to FIURational)
Converts the value of a Decimal structure to a FIURational structure.
Public operatorStatic member(Double to FIURational)
Converts the value of a Double structure to a FIURational structure.
Public operatorStatic member(Int64 to FIURational)
Converts the value of an Int64 structure to a FIURational structure.
Public operatorStatic member(Single to FIURational)
Converts the value of a Single structure to a FIURational structure.
Public operatorStatic member(UInt32 to FIURational)
Converts the value of an UInt32 structure to a FIURational structure.
Public operatorStatic member(UInt64 to FIURational)
Converts the value of an UInt64 structure to a FIURational structure.
Public operatorStatic member(FIURational to Boolean)
Converts the value of a FIURational structure to a Boolean structure.
Public operatorStatic member(FIURational to Byte)
Converts the value of a FIURational structure to a Byte structure.
Public operatorStatic member(FIURational to Char)
Converts the value of a FIURational structure to a Char structure.
Public operatorStatic member(FIURational to Int16)
Converts the value of a FIURational structure to an Int16 structure.
Public operatorStatic member(FIURational to Int32)
Converts the value of a FIURational structure to an Int32 structure.
Public operatorStatic member(FIURational to Int64)
Converts the value of a FIURational structure to an Int64 structure.
Public operatorStatic member(FIURational to SByte)
Converts the value of a FIURational structure to a SByte structure.
Public operatorStatic member(FIURational to UInt16)
Converts the value of a FIURational structure to an UInt16 structure.
Public operatorStatic member(FIURational to UInt32)
Converts the value of a FIURational structure to an UInt32 structure.
Public operatorStatic member(FIURational to UInt64)
Converts the value of a FIURational structure to an UInt32 structure.
Public operatorStatic memberGreaterThan
Standard implementation of the operator.
Public operatorStatic memberGreaterThanOrEqual
Standard implementation of the operator.
Public operatorStatic member(Byte to FIURational)
Converts the value of a Byte structure to a FIURational structure.
Public operatorStatic member(Char to FIURational)
Converts the value of a Char structure to a FIURational structure.
Public operatorStatic member(Int16 to FIURational)
Converts the value of an Int16 structure to a FIURational structure.
Public operatorStatic member(Int32 to FIURational)
Converts the value of an Int32 structure to a FIURational structure.
Public operatorStatic member(SByte to FIURational)
Converts the value of a SByte structure to a FIURational structure.
Public operatorStatic member(UInt16 to FIURational)
Converts the value of an UInt16 structure to a FIURational structure.
Public operatorStatic member(FIURational to Decimal)
Converts the value of a FIURational structure to a Decimal structure.
Public operatorStatic member(FIURational to Double)
Converts the value of a FIURational structure to a Double structure.
Public operatorStatic member(FIURational to Single)
Converts the value of a FIURational structure to a Single structure.
Public operatorStatic memberIncrement
Standard implementation of the operator.
Public operatorStatic memberInequality
Standard implementation of the operator.
Public operatorStatic memberLessThan
Standard implementation of the operator.
Public operatorStatic memberLessThanOrEqual
Standard implementation of the operator.
Public operatorStatic memberModulus
Standard implementation of the operator.
Public operatorStatic memberMultiply
Standard implementation of the operator.
Public operatorStatic memberOnesComplement
Returns the reciprocal value of this instance.
Public operatorStatic memberSubtraction
Standard implementation of the operator.
Public operatorStatic memberUnaryPlus
Standard implementation of the operator.
Top
Fields
  NameDescription
Public fieldStatic memberEpsilon
Represents the smallest positive FIURational value greater than zero. This field is constant.
Public fieldStatic memberMaxValue
Represents the largest possible value of FIURational. This field is constant.
Public fieldStatic memberMinValue
Represents the smallest possible value of FIURational. This field is constant.
Top
Remarks
The structure tries to approximate the value of FIURational(Decimal) when creating a new instance by using a better algorithm than FreeImage does.

The structure implements the following operators: +, ++, --, ==, != , >, >==, <, <== and ~ (which switches nominator and denomiator).

The structure can be converted into all .NET standard types either implicit or explicit.

See Also