Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
FreeImageAPI.FIRational Struct Reference

The FIRational structure represents a fraction via two Int32 instances which are interpreted as numerator and denominator. More...

Inheritance diagram for FreeImageAPI.FIRational:
IEquatable< FIRational > IComparable< FIRational > IFormattable IComparable IConvertible IEquatable< FIRational > IComparable< FIRational > IFormattable IComparable IConvertible

Public Member Functions

 FIRational (int n, int d)
 Initializes a new instance based on the specified parameters. More...
 
unsafe FIRational (FITAG tag)
 Initializes a new instance based on the specified parameters. More...
 
 FIRational (decimal value)
 Initializes a new instance based on the specified parameters. More...
 
int Truncate ()
 Returns the truncated value of the fraction. More...
 
override string ToString ()
 Converts the numeric value of the FIRational object to its equivalent string representation. More...
 
override bool Equals (object obj)
 Tests whether the specified object is a FIRational structure and is equivalent to this FIRational structure. More...
 
override int GetHashCode ()
 Returns a hash code for this FIRational structure. More...
 
TypeCode IConvertible. GetTypeCode ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
string IConvertible. ToString (IFormatProvider provider)
 
object IConvertible. ToType (Type conversionType, IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
int CompareTo (object obj)
 Compares this instance with a specified Object. More...
 
string ToString (string format, IFormatProvider formatProvider)
 Formats the value of the current instance using the specified format. More...
 
bool Equals (FIRational other)
 Tests whether the specified FIRational structure is equivalent to this FIRational structure. More...
 
int CompareTo (FIRational other)
 Compares this instance with a specified FIRational object. More...
 
 FIRational (int n, int d)
 Initializes a new instance based on the specified parameters. More...
 
unsafe FIRational (FITAG tag)
 Initializes a new instance based on the specified parameters. More...
 
 FIRational (decimal value)
 Initializes a new instance based on the specified parameters. More...
 
int Truncate ()
 Returns the truncated value of the fraction. More...
 
override string ToString ()
 Converts the numeric value of the FIRational object to its equivalent string representation. More...
 
override bool Equals (object obj)
 Tests whether the specified object is a FIRational structure and is equivalent to this FIRational structure. More...
 
override int GetHashCode ()
 Returns a hash code for this FIRational structure. More...
 
TypeCode IConvertible. GetTypeCode ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
string IConvertible. ToString (IFormatProvider provider)
 
object IConvertible. ToType (Type conversionType, IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
int CompareTo (object obj)
 Compares this instance with a specified Object. More...
 
string ToString (string format, IFormatProvider formatProvider)
 Formats the value of the current instance using the specified format. More...
 
bool Equals (FIRational other)
 Tests whether the specified FIRational structure is equivalent to this FIRational structure. More...
 
int CompareTo (FIRational other)
 Compares this instance with a specified FIRational object. More...
 

Static Public Member Functions

static FIRational operator+ (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator- (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator~ (FIRational r1)
 Returns the reciprocal value of this instance. More...
 
static FIRational operator++ (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator-- (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator+ (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator- (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator* (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator/ (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator% (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator== (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator!= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator> (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator< (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator>= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator<= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static operator bool (FIRational value)
 Converts the value of a FIRational structure to a Boolean structure. More...
 
static operator byte (FIRational value)
 Converts the value of a FIRational structure to a Byte structure. More...
 
static operator char (FIRational value)
 Converts the value of a FIRational structure to a Char structure. More...
 
static implicit operator decimal (FIRational value)
 Converts the value of a FIRational structure to a Decimal structure. More...
 
static implicit operator double (FIRational value)
 Converts the value of a FIRational structure to a Double structure. More...
 
static operator short (FIRational value)
 Converts the value of a FIRational structure to an Int16 structure. More...
 
static operator int (FIRational value)
 Converts the value of a FIRational structure to an Int32 structure. More...
 
static operator long (FIRational value)
 Converts the value of a FIRational structure to an Int64 structure. More...
 
static implicit operator float (FIRational value)
 Converts the value of a FIRational structure to a Single structure. More...
 
static operator sbyte (FIRational value)
 Converts the value of a FIRational structure to a SByte structure. More...
 
static operator ushort (FIRational value)
 Converts the value of a FIRational structure to an UInt16 structure. More...
 
static operator uint (FIRational value)
 Converts the value of a FIRational structure to an UInt32 structure. More...
 
static operator ulong (FIRational value)
 Converts the value of a FIRational structure to an UInt64 structure. More...
 
static operator FIRational (bool value)
 Converts the value of a Boolean structure to a FIRational structure. More...
 
static implicit operator FIRational (byte value)
 Converts the value of a Byte structure to a FIRational structure. More...
 
static implicit operator FIRational (char value)
 Converts the value of a Char structure to a FIRational structure. More...
 
static operator FIRational (decimal value)
 Converts the value of a Decimal structure to a FIRational structure. More...
 
static operator FIRational (double value)
 Converts the value of a Double structure to a FIRational structure. More...
 
static implicit operator FIRational (short value)
 Converts the value of an Int16 structure to a FIRational structure. More...
 
static implicit operator FIRational (int value)
 Converts the value of an Int32 structure to a FIRational structure. More...
 
static operator FIRational (long value)
 Converts the value of an Int64 structure to a FIRational structure. More...
 
static implicit operator FIRational (sbyte value)
 Converts the value of a SByte structure to a FIRational structure. More...
 
static operator FIRational (float value)
 Converts the value of a Single structure to a FIRational structure. More...
 
static implicit operator FIRational (ushort value)
 Converts the value of an UInt16 structure to a FIRational structure. More...
 
static operator FIRational (uint value)
 Converts the value of an UInt32 structure to a FIRational structure. More...
 
static operator FIRational (ulong value)
 Converts the value of an UInt64 structure to a FIRational structure. More...
 
static FIRational operator+ (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator- (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator~ (FIRational r1)
 Returns the reciprocal value of this instance. More...
 
static FIRational operator++ (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator-- (FIRational r1)
 Standard implementation of the operator. More...
 
static FIRational operator+ (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator- (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator* (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator/ (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static FIRational operator% (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator== (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator!= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator> (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator< (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator>= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static bool operator<= (FIRational r1, FIRational r2)
 Standard implementation of the operator. More...
 
static operator bool (FIRational value)
 Converts the value of a FIRational structure to a Boolean structure. More...
 
static operator byte (FIRational value)
 Converts the value of a FIRational structure to a Byte structure. More...
 
static operator char (FIRational value)
 Converts the value of a FIRational structure to a Char structure. More...
 
static implicit operator decimal (FIRational value)
 Converts the value of a FIRational structure to a Decimal structure. More...
 
static implicit operator double (FIRational value)
 Converts the value of a FIRational structure to a Double structure. More...
 
static operator short (FIRational value)
 Converts the value of a FIRational structure to an Int16 structure. More...
 
static operator int (FIRational value)
 Converts the value of a FIRational structure to an Int32 structure. More...
 
static operator long (FIRational value)
 Converts the value of a FIRational structure to an Int64 structure. More...
 
static implicit operator float (FIRational value)
 Converts the value of a FIRational structure to a Single structure. More...
 
static operator sbyte (FIRational value)
 Converts the value of a FIRational structure to a SByte structure. More...
 
static operator ushort (FIRational value)
 Converts the value of a FIRational structure to an UInt16 structure. More...
 
static operator uint (FIRational value)
 Converts the value of a FIRational structure to an UInt32 structure. More...
 
static operator ulong (FIRational value)
 Converts the value of a FIRational structure to an UInt64 structure. More...
 
static operator FIRational (bool value)
 Converts the value of a Boolean structure to a FIRational structure. More...
 
static implicit operator FIRational (byte value)
 Converts the value of a Byte structure to a FIRational structure. More...
 
static implicit operator FIRational (char value)
 Converts the value of a Char structure to a FIRational structure. More...
 
static operator FIRational (decimal value)
 Converts the value of a Decimal structure to a FIRational structure. More...
 
static operator FIRational (double value)
 Converts the value of a Double structure to a FIRational structure. More...
 
static implicit operator FIRational (short value)
 Converts the value of an Int16 structure to a FIRational structure. More...
 
static implicit operator FIRational (int value)
 Converts the value of an Int32 structure to a FIRational structure. More...
 
static operator FIRational (long value)
 Converts the value of an Int64 structure to a FIRational structure. More...
 
static implicit operator FIRational (sbyte value)
 Converts the value of a SByte structure to a FIRational structure. More...
 
static operator FIRational (float value)
 Converts the value of a Single structure to a FIRational structure. More...
 
static implicit operator FIRational (ushort value)
 Converts the value of an UInt16 structure to a FIRational structure. More...
 
static operator FIRational (uint value)
 Converts the value of an UInt32 structure to a FIRational structure. More...
 
static operator FIRational (ulong value)
 Converts the value of an UInt64 structure to a FIRational structure. More...
 

Static Public Attributes

static readonly FIRational MaxValue = new FIRational(Int32.MaxValue, 1)
 Represents the largest possible value of FIRational. This field is constant. More...
 
static readonly FIRational MinValue = new FIRational(Int32.MinValue, 1)
 Represents the smallest possible value of FIRational. This field is constant. More...
 
static readonly FIRational Epsilon = new FIRational(1, Int32.MaxValue)
 Represents the smallest positive FIRational value greater than zero. This field is constant. More...
 

Properties

int Numerator [get]
 The numerator of the fraction. More...
 
int Denominator [get]
 The denominator of the fraction. More...
 
bool IsInteger [get]
 Returns whether the fraction is representing an integer value. More...
 

Detailed Description

The FIRational structure represents a fraction via two Int32 instances which are interpreted as numerator and denominator.

The structure tries to approximate the value of FreeImageAPI.FIRational(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.

Definition at line 58 of file FIRational.cs.

Constructor & Destructor Documentation

FreeImageAPI.FIRational.FIRational ( int  n,
int  d 
)

Initializes a new instance based on the specified parameters.

Parameters
nThe numerator.
dThe denominator.

Definition at line 86 of file FIRational.cs.

Referenced by FreeImageAPI.FIRational.operator FIRational(), FreeImageAPI.FIRational.operator%(), FreeImageAPI.FIRational.operator*(), and FreeImageAPI.FIRational.operator+().

unsafe FreeImageAPI.FIRational.FIRational ( FITAG  tag)

Initializes a new instance based on the specified parameters.

Parameters
tagThe tag to read the data from.

Definition at line 97 of file FIRational.cs.

FreeImageAPI.FIRational.FIRational ( decimal  value)

Initializes a new instance based on the specified parameters.

Parameters
valueThe value to convert into a fraction.
Exceptions
OverflowExceptionvalue cannot be converted into a fraction represented by two integer values.

Definition at line 119 of file FIRational.cs.

FreeImageAPI.FIRational.FIRational ( int  n,
int  d 
)

Initializes a new instance based on the specified parameters.

Parameters
nThe numerator.
dThe denominator.

Definition at line 86 of file FIRational.cs.

unsafe FreeImageAPI.FIRational.FIRational ( FITAG  tag)

Initializes a new instance based on the specified parameters.

Parameters
tagThe tag to read the data from.

Definition at line 97 of file FIRational.cs.

FreeImageAPI.FIRational.FIRational ( decimal  value)

Initializes a new instance based on the specified parameters.

Parameters
valueThe value to convert into a fraction.
Exceptions
OverflowExceptionvalue cannot be converted into a fraction represented by two integer values.

Definition at line 119 of file FIRational.cs.

Member Function Documentation

int FreeImageAPI.FIRational.CompareTo ( object  obj)

Compares this instance with a specified Object.

Parameters
objAn object to compare with this instance.
Returns
A 32-bit signed integer indicating the lexical relationship between the two comparands.
Exceptions
ArgumentExceptionobj is not a FIRational.

Definition at line 943 of file FIRational.cs.

Referenced by FreeImageAPI.FIRational.CompareTo().

int FreeImageAPI.FIRational.CompareTo ( object  obj)

Compares this instance with a specified Object.

Parameters
objAn object to compare with this instance.
Returns
A 32-bit signed integer indicating the lexical relationship between the two comparands.
Exceptions
ArgumentExceptionobj is not a FIRational.

Definition at line 943 of file FIRational.cs.

References FreeImageAPI.FIRational.CompareTo().

int FreeImageAPI.FIRational.CompareTo ( FIRational  other)

Compares this instance with a specified FIRational object.

Parameters
otherA FIRational to compare.
Returns
A signed number indicating the relative values of this instance and other .

Definition at line 998 of file FIRational.cs.

int FreeImageAPI.FIRational.CompareTo ( FIRational  other)

Compares this instance with a specified FIRational object.

Parameters
otherA FIRational to compare.
Returns
A signed number indicating the relative values of this instance and other .

Definition at line 1000 of file FIRational.cs.

override bool FreeImageAPI.FIRational.Equals ( object  obj)

Tests whether the specified object is a FIRational structure and is equivalent to this FIRational structure.

Parameters
objThe object to test.
Returns
true if obj is a FIRational structure equivalent to this FIRational structure; otherwise, false.

Definition at line 395 of file FIRational.cs.

override bool FreeImageAPI.FIRational.Equals ( object  obj)

Tests whether the specified object is a FIRational structure and is equivalent to this FIRational structure.

Parameters
objThe object to test.
Returns
true if obj is a FIRational structure equivalent to this FIRational structure; otherwise, false.

Definition at line 395 of file FIRational.cs.

bool FreeImageAPI.FIRational.Equals ( FIRational  other)

Tests whether the specified FIRational structure is equivalent to this FIRational structure.

Parameters
otherA FIRational structure to compare to this instance.

Definition at line 983 of file FIRational.cs.

bool FreeImageAPI.FIRational.Equals ( FIRational  other)

Tests whether the specified FIRational structure is equivalent to this FIRational structure.

Parameters
otherA FIRational structure to compare to this instance.
Returns
true if obj is a FIRational structure equivalent to this FIRational structure; otherwise, false.

Definition at line 985 of file FIRational.cs.

override int FreeImageAPI.FIRational.GetHashCode ( )

Returns a hash code for this FIRational structure.

Returns
An integer value that specifies the hash code for this FIRational.

Definition at line 404 of file FIRational.cs.

override int FreeImageAPI.FIRational.GetHashCode ( )

Returns a hash code for this FIRational structure.

Returns
An integer value that specifies the hash code for this FIRational.

Definition at line 404 of file FIRational.cs.

TypeCode IConvertible. FreeImageAPI.FIRational.GetTypeCode ( )

Definition at line 848 of file FIRational.cs.

TypeCode IConvertible. FreeImageAPI.FIRational.GetTypeCode ( )

Definition at line 848 of file FIRational.cs.

static FreeImageAPI.FIRational.operator bool ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Boolean structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Boolean initialized to value .

Definition at line 587 of file FIRational.cs.

static FreeImageAPI.FIRational.operator bool ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Boolean structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Boolean initialized to value .

Definition at line 587 of file FIRational.cs.

static FreeImageAPI.FIRational.operator byte ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Byte structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Byte initialized to value .

Definition at line 597 of file FIRational.cs.

static FreeImageAPI.FIRational.operator byte ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Byte structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Byte initialized to value .

Definition at line 597 of file FIRational.cs.

static FreeImageAPI.FIRational.operator char ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Char structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Char initialized to value .

Definition at line 607 of file FIRational.cs.

static FreeImageAPI.FIRational.operator char ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a Char structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Char initialized to value .

Definition at line 607 of file FIRational.cs.

static implicit FreeImageAPI.FIRational.operator decimal ( FIRational  value)
static

Converts the value of a FIRational structure to a Decimal structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Decimal initialized to value .

Definition at line 617 of file FIRational.cs.

static implicit FreeImageAPI.FIRational.operator decimal ( FIRational  value)
static

Converts the value of a FIRational structure to a Decimal structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Decimal initialized to value .

Definition at line 617 of file FIRational.cs.

static implicit FreeImageAPI.FIRational.operator double ( FIRational  value)
static

Converts the value of a FIRational structure to a Double structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Double initialized to value .

Definition at line 627 of file FIRational.cs.

static implicit FreeImageAPI.FIRational.operator double ( FIRational  value)
static

Converts the value of a FIRational structure to a Double structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Double initialized to value .

Definition at line 627 of file FIRational.cs.

static FreeImageAPI.FIRational.operator FIRational ( bool  value)
explicitstatic

Converts the value of a Boolean structure to a FIRational structure.

Parameters
valueA Boolean structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 719 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( bool  value)
explicitstatic

Converts the value of a Boolean structure to a FIRational structure.

Parameters
valueA Boolean structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 719 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( byte  value)
static

Converts the value of a Byte structure to a FIRational structure.

Parameters
valueA Byte structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 729 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( byte  value)
static

Converts the value of a Byte structure to a FIRational structure.

Parameters
valueA Byte structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 729 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( char  value)
static

Converts the value of a Char structure to a FIRational structure.

Parameters
valueA Char structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 739 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( char  value)
static

Converts the value of a Char structure to a FIRational structure.

Parameters
valueA Char structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 739 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( decimal  value)
explicitstatic

Converts the value of a Decimal structure to a FIRational structure.

Parameters
valueA Decimal structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 749 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( decimal  value)
explicitstatic

Converts the value of a Decimal structure to a FIRational structure.

Parameters
valueA Decimal structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 749 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( double  value)
explicitstatic

Converts the value of a Double structure to a FIRational structure.

Parameters
valueA Double structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 759 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( double  value)
explicitstatic

Converts the value of a Double structure to a FIRational structure.

Parameters
valueA Double structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 759 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( short  value)
static

Converts the value of an Int16 structure to a FIRational structure.

Parameters
valueAn Int16 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 769 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( short  value)
static

Converts the value of an Int16 structure to a FIRational structure.

Parameters
valueAn Int16 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 769 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( int  value)
static

Converts the value of an Int32 structure to a FIRational structure.

Parameters
valueAn Int32 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 779 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( int  value)
static

Converts the value of an Int32 structure to a FIRational structure.

Parameters
valueAn Int32 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 779 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( long  value)
explicitstatic

Converts the value of an Int64 structure to a FIRational structure.

Parameters
valueAn Int64 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 789 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( long  value)
explicitstatic

Converts the value of an Int64 structure to a FIRational structure.

Parameters
valueAn Int64 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 789 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( sbyte  value)
static

Converts the value of a SByte structure to a FIRational structure.

Parameters
valueA SByte structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 799 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( sbyte  value)
static

Converts the value of a SByte structure to a FIRational structure.

Parameters
valueA SByte structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 799 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( float  value)
explicitstatic

Converts the value of a Single structure to a FIRational structure.

Parameters
valueA Single structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 809 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( float  value)
explicitstatic

Converts the value of a Single structure to a FIRational structure.

Parameters
valueA Single structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 809 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( ushort  value)
static

Converts the value of an UInt16 structure to a FIRational structure.

Parameters
valueAn UInt16 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 819 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator FIRational ( ushort  value)
static

Converts the value of an UInt16 structure to a FIRational structure.

Parameters
valueAn UInt16 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 819 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( uint  value)
explicitstatic

Converts the value of an UInt32 structure to a FIRational structure.

Parameters
valueAn UInt32 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 829 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( uint  value)
explicitstatic

Converts the value of an UInt32 structure to a FIRational structure.

Parameters
valueAn UInt32 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 829 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( ulong  value)
explicitstatic

Converts the value of an UInt64 structure to a FIRational structure.

Parameters
valueAn UInt64 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 839 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FreeImageAPI.FIRational.operator FIRational ( ulong  value)
explicitstatic

Converts the value of an UInt64 structure to a FIRational structure.

Parameters
valueAn UInt64 structure.
Returns
A new instance of FIRational initialized to value .

Definition at line 839 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static implicit FreeImageAPI.FIRational.operator float ( FIRational  value)
static

Converts the value of a FIRational structure to a Single structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Single initialized to value .

Definition at line 667 of file FIRational.cs.

static implicit FreeImageAPI.FIRational.operator float ( FIRational  value)
static

Converts the value of a FIRational structure to a Single structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Single initialized to value .

Definition at line 667 of file FIRational.cs.

static FreeImageAPI.FIRational.operator int ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int32 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int32 initialized to value .

Definition at line 647 of file FIRational.cs.

static FreeImageAPI.FIRational.operator int ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int32 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int32 initialized to value .

Definition at line 647 of file FIRational.cs.

static FreeImageAPI.FIRational.operator long ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int64 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int64 initialized to value .

Definition at line 657 of file FIRational.cs.

static FreeImageAPI.FIRational.operator long ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int64 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int64 initialized to value .

Definition at line 657 of file FIRational.cs.

static FreeImageAPI.FIRational.operator sbyte ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a SByte structure.

Parameters
valueA FIRational structure.
Returns
A new instance of SByte initialized to value .

Definition at line 677 of file FIRational.cs.

static FreeImageAPI.FIRational.operator sbyte ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to a SByte structure.

Parameters
valueA FIRational structure.
Returns
A new instance of SByte initialized to value .

Definition at line 677 of file FIRational.cs.

static FreeImageAPI.FIRational.operator short ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int16 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int16 initialized to value .

Definition at line 637 of file FIRational.cs.

static FreeImageAPI.FIRational.operator short ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an Int16 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of Int16 initialized to value .

Definition at line 637 of file FIRational.cs.

static FreeImageAPI.FIRational.operator uint ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt32 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt32 initialized to value .

Definition at line 697 of file FIRational.cs.

static FreeImageAPI.FIRational.operator uint ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt32 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt32 initialized to value .

Definition at line 697 of file FIRational.cs.

static FreeImageAPI.FIRational.operator ulong ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt64 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt64 initialized to value .

Definition at line 707 of file FIRational.cs.

static FreeImageAPI.FIRational.operator ulong ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt64 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt64 initialized to value .

Definition at line 707 of file FIRational.cs.

static FreeImageAPI.FIRational.operator ushort ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt16 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt16 initialized to value .

Definition at line 687 of file FIRational.cs.

static FreeImageAPI.FIRational.operator ushort ( FIRational  value)
explicitstatic

Converts the value of a FIRational structure to an UInt16 structure.

Parameters
valueA FIRational structure.
Returns
A new instance of UInt16 initialized to value .

Definition at line 687 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator!= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 537 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator!= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 537 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator% ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 515 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator% ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 515 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator* ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 490 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator* ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 490 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator+ ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 414 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator+ ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 414 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator+ ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 467 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator+ ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 467 of file FIRational.cs.

References FreeImageAPI.FIRational.FIRational().

static FIRational FreeImageAPI.FIRational.operator++ ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 443 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator++ ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 443 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator- ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 422 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator- ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 422 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator- ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 482 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator- ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 482 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator-- ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 455 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator-- ( FIRational  r1)
static

Standard implementation of the operator.

Definition at line 455 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator/ ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 504 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator/ ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 504 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator< ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 554 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator< ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 554 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator<= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 572 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator<= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 572 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator== ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 527 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator== ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 527 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator> ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 545 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator> ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 545 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator>= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 563 of file FIRational.cs.

static bool FreeImageAPI.FIRational.operator>= ( FIRational  r1,
FIRational  r2 
)
static

Standard implementation of the operator.

Definition at line 563 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator~ ( FIRational  r1)
static

Returns the reciprocal value of this instance.

Definition at line 431 of file FIRational.cs.

static FIRational FreeImageAPI.FIRational.operator~ ( FIRational  r1)
static

Returns the reciprocal value of this instance.

Definition at line 431 of file FIRational.cs.

bool IConvertible. FreeImageAPI.FIRational.ToBoolean ( IFormatProvider  provider)

Definition at line 853 of file FIRational.cs.

bool IConvertible. FreeImageAPI.FIRational.ToBoolean ( IFormatProvider  provider)

Definition at line 853 of file FIRational.cs.

byte IConvertible. FreeImageAPI.FIRational.ToByte ( IFormatProvider  provider)

Definition at line 858 of file FIRational.cs.

byte IConvertible. FreeImageAPI.FIRational.ToByte ( IFormatProvider  provider)

Definition at line 858 of file FIRational.cs.

char IConvertible. FreeImageAPI.FIRational.ToChar ( IFormatProvider  provider)

Definition at line 863 of file FIRational.cs.

char IConvertible. FreeImageAPI.FIRational.ToChar ( IFormatProvider  provider)

Definition at line 863 of file FIRational.cs.

DateTime IConvertible. FreeImageAPI.FIRational.ToDateTime ( IFormatProvider  provider)

Definition at line 868 of file FIRational.cs.

DateTime IConvertible. FreeImageAPI.FIRational.ToDateTime ( IFormatProvider  provider)

Definition at line 868 of file FIRational.cs.

decimal IConvertible. FreeImageAPI.FIRational.ToDecimal ( IFormatProvider  provider)

Definition at line 873 of file FIRational.cs.

decimal IConvertible. FreeImageAPI.FIRational.ToDecimal ( IFormatProvider  provider)

Definition at line 873 of file FIRational.cs.

double IConvertible. FreeImageAPI.FIRational.ToDouble ( IFormatProvider  provider)

Definition at line 878 of file FIRational.cs.

double IConvertible. FreeImageAPI.FIRational.ToDouble ( IFormatProvider  provider)

Definition at line 878 of file FIRational.cs.

short IConvertible. FreeImageAPI.FIRational.ToInt16 ( IFormatProvider  provider)

Definition at line 883 of file FIRational.cs.

short IConvertible. FreeImageAPI.FIRational.ToInt16 ( IFormatProvider  provider)

Definition at line 883 of file FIRational.cs.

int IConvertible. FreeImageAPI.FIRational.ToInt32 ( IFormatProvider  provider)

Definition at line 888 of file FIRational.cs.

int IConvertible. FreeImageAPI.FIRational.ToInt32 ( IFormatProvider  provider)

Definition at line 888 of file FIRational.cs.

long IConvertible. FreeImageAPI.FIRational.ToInt64 ( IFormatProvider  provider)

Definition at line 893 of file FIRational.cs.

long IConvertible. FreeImageAPI.FIRational.ToInt64 ( IFormatProvider  provider)

Definition at line 893 of file FIRational.cs.

sbyte IConvertible. FreeImageAPI.FIRational.ToSByte ( IFormatProvider  provider)

Definition at line 898 of file FIRational.cs.

sbyte IConvertible. FreeImageAPI.FIRational.ToSByte ( IFormatProvider  provider)

Definition at line 898 of file FIRational.cs.

float IConvertible. FreeImageAPI.FIRational.ToSingle ( IFormatProvider  provider)

Definition at line 903 of file FIRational.cs.

float IConvertible. FreeImageAPI.FIRational.ToSingle ( IFormatProvider  provider)

Definition at line 903 of file FIRational.cs.

override string FreeImageAPI.FIRational.ToString ( )

Converts the numeric value of the FIRational object to its equivalent string representation.

Returns
The string representation of the value of this instance.

Definition at line 383 of file FIRational.cs.

References FreeImageAPI.FIRational.ToString().

override string FreeImageAPI.FIRational.ToString ( )

Converts the numeric value of the FIRational object to its equivalent string representation.

Returns
The string representation of the value of this instance.

Definition at line 383 of file FIRational.cs.

Referenced by FreeImageAPI.FIRational.ToString().

string IConvertible. FreeImageAPI.FIRational.ToString ( IFormatProvider  provider)

Definition at line 908 of file FIRational.cs.

References FreeImageAPI.FIRational.ToString().

string IConvertible. FreeImageAPI.FIRational.ToString ( IFormatProvider  provider)

Definition at line 908 of file FIRational.cs.

References FreeImageAPI.FIRational.ToString().

string FreeImageAPI.FIRational.ToString ( string  format,
IFormatProvider  formatProvider 
)

Formats the value of the current instance using the specified format.

Parameters
formatThe String specifying the format to use.
formatProviderThe IFormatProvider to use to format the value.
Returns
A String containing the value of the current instance in the specified format.

Definition at line 966 of file FIRational.cs.

References DirectX.format.

string FreeImageAPI.FIRational.ToString ( string  format,
IFormatProvider  formatProvider 
)

Formats the value of the current instance using the specified format.

Parameters
formatThe String specifying the format to use.
formatProviderThe IFormatProvider to use to format the value.
Returns
A String containing the value of the current instance in the specified format.

Definition at line 966 of file FIRational.cs.

References DirectX.format.

object IConvertible. FreeImageAPI.FIRational.ToType ( Type  conversionType,
IFormatProvider  provider 
)

Definition at line 913 of file FIRational.cs.

object IConvertible. FreeImageAPI.FIRational.ToType ( Type  conversionType,
IFormatProvider  provider 
)

Definition at line 913 of file FIRational.cs.

ushort IConvertible. FreeImageAPI.FIRational.ToUInt16 ( IFormatProvider  provider)

Definition at line 918 of file FIRational.cs.

ushort IConvertible. FreeImageAPI.FIRational.ToUInt16 ( IFormatProvider  provider)

Definition at line 918 of file FIRational.cs.

uint IConvertible. FreeImageAPI.FIRational.ToUInt32 ( IFormatProvider  provider)

Definition at line 923 of file FIRational.cs.

uint IConvertible. FreeImageAPI.FIRational.ToUInt32 ( IFormatProvider  provider)

Definition at line 923 of file FIRational.cs.

ulong IConvertible. FreeImageAPI.FIRational.ToUInt64 ( IFormatProvider  provider)

Definition at line 928 of file FIRational.cs.

ulong IConvertible. FreeImageAPI.FIRational.ToUInt64 ( IFormatProvider  provider)

Definition at line 928 of file FIRational.cs.

int FreeImageAPI.FIRational.Truncate ( )

Returns the truncated value of the fraction.

Returns

Definition at line 176 of file FIRational.cs.

int FreeImageAPI.FIRational.Truncate ( )

Returns the truncated value of the fraction.

Returns

Definition at line 176 of file FIRational.cs.

Member Data Documentation

static readonly FIRational FreeImageAPI.FIRational.Epsilon = new FIRational(1, Int32.MaxValue)
static

Represents the smallest positive FIRational value greater than zero. This field is constant.

Definition at line 79 of file FIRational.cs.

static readonly FIRational FreeImageAPI.FIRational.MaxValue = new FIRational(Int32.MaxValue, 1)
static

Represents the largest possible value of FIRational. This field is constant.

Definition at line 69 of file FIRational.cs.

static readonly FIRational FreeImageAPI.FIRational.MinValue = new FIRational(Int32.MinValue, 1)
static

Represents the smallest possible value of FIRational. This field is constant.

Definition at line 74 of file FIRational.cs.

Property Documentation

int FreeImageAPI.FIRational.Denominator
get

The denominator of the fraction.

Definition at line 168 of file FIRational.cs.

bool FreeImageAPI.FIRational.IsInteger
get

Returns whether the fraction is representing an integer value.

Definition at line 185 of file FIRational.cs.

int FreeImageAPI.FIRational.Numerator
get

The numerator of the fraction.

Definition at line 160 of file FIRational.cs.


The documentation for this struct was generated from the following file: