Show / Hide Table of Contents

Struct MathEx.UFraction32

Represents a generic rational number represented by 32-bit unsigned numerator and denominator.

Implements
System.IComparable
System.IFormattable
System.IComparable<MathEx.UFraction32>
System.IEquatable<MathEx.UFraction32>
Namespace: ExifLibrary
Assembly: ExifLibrary.dll
Syntax
public struct UFraction32 : IComparable, IFormattable, IComparable<MathEx.UFraction32>, IEquatable<MathEx.UFraction32>

Constructors

| Improve this Doc View Source

UFraction32(MathEx.UFraction32)

Declaration
public UFraction32(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
| Improve this Doc View Source

UFraction32(Double)

Declaration
public UFraction32(double value)
Parameters
Type Name Description
System.Double value
| Improve this Doc View Source

UFraction32(Single)

Declaration
public UFraction32(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

UFraction32(String)

Declaration
public UFraction32(string s)
Parameters
Type Name Description
System.String s
| Improve this Doc View Source

UFraction32(UInt32)

Declaration
public UFraction32(uint numerator)
Parameters
Type Name Description
System.UInt32 numerator
| Improve this Doc View Source

UFraction32(UInt32, UInt32)

Declaration
public UFraction32(uint numerator, uint denominator)
Parameters
Type Name Description
System.UInt32 numerator
System.UInt32 denominator
| Improve this Doc View Source

UFraction32(UInt32, UInt32, Double)

Declaration
public UFraction32(uint numerator, uint denominator, double error)
Parameters
Type Name Description
System.UInt32 numerator
System.UInt32 denominator
System.Double error

Fields

| Improve this Doc View Source

Infinity

Declaration
public static readonly MathEx.UFraction32 Infinity
Field Value
Type Description
MathEx.UFraction32
| Improve this Doc View Source

NaN

Declaration
public static readonly MathEx.UFraction32 NaN
Field Value
Type Description
MathEx.UFraction32

Properties

| Improve this Doc View Source

Denominator

Gets or sets the denominator.

Declaration
public uint Denominator { get; set; }
Property Value
Type Description
System.UInt32
| Improve this Doc View Source

Error

Gets the error term.

Declaration
public double Error { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Numerator

Gets or sets the numerator.

Declaration
public uint Numerator { get; set; }
Property Value
Type Description
System.UInt32

Methods

| Improve this Doc View Source

CompareTo(MathEx.UFraction32)

Compares this instance to a specified object and returns an indication of their relative values.

Declaration
public int CompareTo(MathEx.UFraction32 obj)
Parameters
Type Name Description
MathEx.UFraction32 obj

An fraction to compare with this instance.

Returns
Type Description
System.Int32

A signed number indicating the relative values of this instance and value. Less than zero: This instance is less than obj. Zero: This instance is equal to obj. Greater than zero: This instance is greater than obj or obj is null.

| Improve this Doc View Source

CompareTo(Object)

Compares this instance to a specified object and returns an indication of their relative values.

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
System.Object obj

An object to compare, or null.

Returns
Type Description
System.Int32

A signed number indicating the relative values of this instance and value. Less than zero: This instance is less than obj. Zero: This instance is equal to obj. Greater than zero: This instance is greater than obj or obj is null.

Exceptions
Type Condition
System.ArgumentException

obj is not a Fraction.

| Improve this Doc View Source

Equals(MathEx.UFraction32)

Indicates whether this instance and a specified object are equal value-wise.

Declaration
public bool Equals(MathEx.UFraction32 obj)
Parameters
Type Name Description
MathEx.UFraction32 obj

Another fraction object to compare to.

Returns
Type Description
System.Boolean

true if obj and this instance represent the same value; otherwise, false.

| Improve this Doc View Source

Equals(Object)

Indicates whether this instance and a specified object are equal value-wise.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Another object to compare to.

Returns
Type Description
System.Boolean

true if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer that is the hash code for this instance.

Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

Inverse(MathEx.UFraction32)

Returns the multiplicative inverse of a given value.

Declaration
public static MathEx.UFraction32 Inverse(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f

A fraction.

Returns
Type Description
MathEx.UFraction32

Multiplicative inverse of f.

| Improve this Doc View Source

IsInfinity(MathEx.UFraction32)

Returns a value indicating whether the specified number evaluates to infinity.

Declaration
public static bool IsInfinity(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f

A fraction.

Returns
Type Description
System.Boolean

true if f evaluates to Fraction.Infinity; otherwise, false.

| Improve this Doc View Source

IsNan(MathEx.UFraction32)

Returns a value indicating whether the specified number evaluates to a value that is not a number.

Declaration
public static bool IsNan(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f

A fraction.

Returns
Type Description
System.Boolean

true if f evaluates to Fraction.NaN; otherwise, false.

| Improve this Doc View Source

Parse(String)

Converts the string representation of a fraction to a fraction object.

Declaration
public static MathEx.UFraction32 Parse(string s)
Parameters
Type Name Description
System.String s

A string formatted as numerator/denominator

Returns
Type Description
MathEx.UFraction32

A fraction object converted from s.

Exceptions
Type Condition
System.ArgumentNullException

s is null

System.FormatException

s is not in the correct format

System.OverflowException

s represents a number less than System.UInt32.MinValue or greater than System.UInt32.MaxValue.

| Improve this Doc View Source

Set(UInt32, UInt32)

Sets the value of this instance to the fraction represented by the given numerator and denominator.

Declaration
public void Set(uint numerator, uint denominator)
Parameters
Type Name Description
System.UInt32 numerator

The new numerator.

System.UInt32 denominator

The new denominator.

| Improve this Doc View Source

ToString()

Returns a string representation of the fraction.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string formatted as numerator/denominator.

Overrides
System.ValueType.ToString()
| Improve this Doc View Source

ToString(IFormatProvider)

Returns a string representation of the fraction.

Declaration
public string ToString(IFormatProvider formatProvider)
Parameters
Type Name Description
System.IFormatProvider formatProvider

An System.IFormatProvider that supplies culture-specific formatting information.

Returns
Type Description
System.String

The string representation of the value of this instance as specified by provider.

| Improve this Doc View Source

ToString(String)

Returns a string representation of the fraction.

Declaration
public string ToString(string format)
Parameters
Type Name Description
System.String format

A numeric format string.

Returns
Type Description
System.String

The string representation of the value of this instance as specified by format.

Exceptions
Type Condition
System.FormatException

format is invalid or not supported.

| Improve this Doc View Source

ToString(String, IFormatProvider)

Returns a string representation of the fraction.

Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type Name Description
System.String format

A numeric format string.

System.IFormatProvider formatProvider

An System.IFormatProvider that supplies culture-specific formatting information.

Returns
Type Description
System.String

The string representation of the value of this instance as specified by format and provider.

Exceptions
Type Condition
System.FormatException

format is invalid or not supported.

| Improve this Doc View Source

TryParse(String, out MathEx.UFraction32)

Converts the string representation of a fraction to a fraction object. A return value indicates whether the conversion succeeded.

Declaration
public static bool TryParse(string s, out MathEx.UFraction32 f)
Parameters
Type Name Description
System.String s

A string formatted as numerator/denominator

MathEx.UFraction32 f
Returns
Type Description
System.Boolean

true if s was converted successfully; otherwise, false.

Operators

| Improve this Doc View Source

Addition(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator +(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(MathEx.UFraction32, Double)

Declaration
public static MathEx.UFraction32 operator +(MathEx.UFraction32 f, double n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Double n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(MathEx.UFraction32, Single)

Declaration
public static MathEx.UFraction32 operator +(MathEx.UFraction32 f, float n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Single n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(MathEx.UFraction32, UInt32)

Declaration
public static MathEx.UFraction32 operator +(MathEx.UFraction32 f, uint n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.UInt32 n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(Double, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator +(double n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Double n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(Single, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator +(float n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Single n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Addition(UInt32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator +(uint n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.UInt32 n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Decrement(MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator --(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Division(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator /(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Division(MathEx.UFraction32, Double)

Declaration
public static MathEx.UFraction32 operator /(MathEx.UFraction32 f, double n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Double n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Division(MathEx.UFraction32, Single)

Declaration
public static MathEx.UFraction32 operator /(MathEx.UFraction32 f, float n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Single n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Division(MathEx.UFraction32, UInt32)

Declaration
public static MathEx.UFraction32 operator /(MathEx.UFraction32 f, uint n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.UInt32 n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Equality(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static bool operator ==(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Explicit(MathEx.UFraction32 to Double)

Declaration
public static explicit operator double (MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
Returns
Type Description
System.Double
| Improve this Doc View Source

Explicit(MathEx.UFraction32 to Single)

Declaration
public static explicit operator float (MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
Returns
Type Description
System.Single
| Improve this Doc View Source

Explicit(MathEx.UFraction32 to UInt32)

Declaration
public static explicit operator uint (MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
Returns
Type Description
System.UInt32
| Improve this Doc View Source

GreaterThan(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static bool operator>(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Increment(MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator ++(MathEx.UFraction32 f)
Parameters
Type Name Description
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Inequality(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static bool operator !=(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LessThan(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static bool operator <(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Multiply(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator *(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(MathEx.UFraction32, Double)

Declaration
public static MathEx.UFraction32 operator *(MathEx.UFraction32 f, double n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Double n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(MathEx.UFraction32, Single)

Declaration
public static MathEx.UFraction32 operator *(MathEx.UFraction32 f, float n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Single n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(MathEx.UFraction32, UInt32)

Declaration
public static MathEx.UFraction32 operator *(MathEx.UFraction32 f, uint n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.UInt32 n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(Double, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator *(double n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Double n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(Single, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator *(float n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Single n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Multiply(UInt32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator *(uint n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.UInt32 n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(MathEx.UFraction32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator -(MathEx.UFraction32 f1, MathEx.UFraction32 f2)
Parameters
Type Name Description
MathEx.UFraction32 f1
MathEx.UFraction32 f2
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(MathEx.UFraction32, Double)

Declaration
public static MathEx.UFraction32 operator -(MathEx.UFraction32 f, double n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Double n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(MathEx.UFraction32, Single)

Declaration
public static MathEx.UFraction32 operator -(MathEx.UFraction32 f, float n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.Single n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(MathEx.UFraction32, UInt32)

Declaration
public static MathEx.UFraction32 operator -(MathEx.UFraction32 f, uint n)
Parameters
Type Name Description
MathEx.UFraction32 f
System.UInt32 n
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(Double, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator -(double n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Double n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(Single, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator -(float n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.Single n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32
| Improve this Doc View Source

Subtraction(UInt32, MathEx.UFraction32)

Declaration
public static MathEx.UFraction32 operator -(uint n, MathEx.UFraction32 f)
Parameters
Type Name Description
System.UInt32 n
MathEx.UFraction32 f
Returns
Type Description
MathEx.UFraction32

Implements

System.IComparable
System.IFormattable
System.IComparable<T>
System.IEquatable<T>
Back to top Copyright © 2019 Özgür Özçıtak