FreeImage.NET Class Library Reference
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
Name | Description | |
---|---|---|
FIURational(Decimal) |
Initializes a new instance based on the specified parameters.
| |
FIURational(FITAG) |
Initializes a new instance based on the specified parameters.
| |
FIURational(UInt32, UInt32) |
Initializes a new instance based on the specified parameters.
|
Properties
Name | Description | |
---|---|---|
Denominator |
The denominator of the fraction.
| |
IsInteger |
Returns whether the fraction is representing an integer value.
| |
Numerator |
The numerator of the fraction.
|
Methods
Name | Description | |
---|---|---|
CompareTo(Object) |
Compares this instance with a specified Object.
| |
CompareTo(FIURational) |
Compares this instance with a specified FIURational object.
| |
Equals(Object) |
Tests whether the specified object is a FIURational structure
and is equivalent to this FIURational structure.
(Overrides ValueTypeEquals(Object).) | |
Equals(FIURational) |
Tests whether the specified FIURational structure is equivalent to this FIURational structure.
| |
GetHashCode |
Returns a hash code for this FIURational structure.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString |
Converts the numeric value of the FIURational object
to its equivalent string representation.
(Overrides ValueTypeToString.) | |
ToString(String, IFormatProvider) |
Formats the value of the current instance using the specified format.
| |
Truncate |
Returns the truncated value of the fraction.
|
Operators
Name | Description | |
---|---|---|
Addition |
Standard implementation of the operator.
| |
Decrement |
Standard implementation of the operator.
| |
Division |
Standard implementation of the operator.
| |
Equality |
Standard implementation of the operator.
| |
(Boolean to FIURational) |
Converts the value of a Boolean structure to a FIURational structure.
| |
(Decimal to FIURational) |
Converts the value of a Decimal structure to a FIURational structure.
| |
(Double to FIURational) |
Converts the value of a Double structure to a FIURational structure.
| |
(Int64 to FIURational) |
Converts the value of an Int64 structure to a FIURational structure.
| |
(Single to FIURational) |
Converts the value of a Single structure to a FIURational structure.
| |
(UInt32 to FIURational) |
Converts the value of an UInt32 structure to a FIURational structure.
| |
(UInt64 to FIURational) |
Converts the value of an UInt64 structure to a FIURational structure.
| |
(FIURational to Boolean) |
Converts the value of a FIURational structure to a Boolean structure.
| |
(FIURational to Byte) |
Converts the value of a FIURational structure to a Byte structure.
| |
(FIURational to Char) |
Converts the value of a FIURational structure to a Char structure.
| |
(FIURational to Int16) |
Converts the value of a FIURational structure to an Int16 structure.
| |
(FIURational to Int32) |
Converts the value of a FIURational structure to an Int32 structure.
| |
(FIURational to Int64) |
Converts the value of a FIURational structure to an Int64 structure.
| |
(FIURational to SByte) |
Converts the value of a FIURational structure to a SByte structure.
| |
(FIURational to UInt16) |
Converts the value of a FIURational structure to an UInt16 structure.
| |
(FIURational to UInt32) |
Converts the value of a FIURational structure to an UInt32 structure.
| |
(FIURational to UInt64) |
Converts the value of a FIURational structure to an UInt32 structure.
| |
GreaterThan |
Standard implementation of the operator.
| |
GreaterThanOrEqual |
Standard implementation of the operator.
| |
(Byte to FIURational) |
Converts the value of a Byte structure to a FIURational structure.
| |
(Char to FIURational) |
Converts the value of a Char structure to a FIURational structure.
| |
(Int16 to FIURational) |
Converts the value of an Int16 structure to a FIURational structure.
| |
(Int32 to FIURational) |
Converts the value of an Int32 structure to a FIURational structure.
| |
(SByte to FIURational) |
Converts the value of a SByte structure to a FIURational structure.
| |
(UInt16 to FIURational) |
Converts the value of an UInt16 structure to a FIURational structure.
| |
(FIURational to Decimal) |
Converts the value of a FIURational structure to a Decimal structure.
| |
(FIURational to Double) |
Converts the value of a FIURational structure to a Double structure.
| |
(FIURational to Single) |
Converts the value of a FIURational structure to a Single structure.
| |
Increment |
Standard implementation of the operator.
| |
Inequality |
Standard implementation of the operator.
| |
LessThan |
Standard implementation of the operator.
| |
LessThanOrEqual |
Standard implementation of the operator.
| |
Modulus |
Standard implementation of the operator.
| |
Multiply |
Standard implementation of the operator.
| |
OnesComplement |
Returns the reciprocal value of this instance.
| |
Subtraction |
Standard implementation of the operator.
| |
UnaryPlus |
Standard implementation of the operator.
|
Fields
Name | Description | |
---|---|---|
Epsilon |
Represents the smallest positive FIURational value greater than zero. This field is constant.
| |
MaxValue |
Represents the largest possible value of FIURational. This field is constant.
| |
MinValue |
Represents the smallest possible value of FIURational. This field is constant.
|
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