BigRational.CompareTo Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

CompareTo(BigInteger) Compares this instance to a specified rational number and returns an indication of their relative values.
CompareTo(BigRational) Compares this instance to a specified rational number and returns an indication of their relative values.
CompareTo(Int32) Compares this instance to a specified rational number and returns an indication of their relative values.

CompareTo(BigInteger)

Compares this instance to a specified rational number and returns an indication of their relative values.
C#
public int CompareTo(
	BigInteger other
)

Parameters

other  BigInteger
A BigInteger number to compare to this instance.

Return Value

Int32
A signed integer that indicates the relative values of this instance and other.
Return ValueDescription
Less than zeroThis instance is smaller than other.
ZeroThis instance is equal to other.
Greater than zeroThis instance is greater than other.

Implements

IComparable<T>.CompareTo(T)

CompareTo(BigRational)

Compares this instance to a specified rational number and returns an indication of their relative values.
C#
public int CompareTo(
	BigRational other
)

Parameters

other  BigRational
A rational number to compare to this instance.

Return Value

Int32
A signed integer that indicates the relative values of this instance and other.
Return ValueDescription
Less than zeroThis instance is smaller than other.
ZeroThis instance is equal to other.
Greater than zeroThis instance is greater than other.

Implements

IComparable<T>.CompareTo(T)

CompareTo(Int32)

Compares this instance to a specified rational number and returns an indication of their relative values.
C#
public int CompareTo(
	int other
)

Parameters

other  Int32
A BigInteger number to compare to this instance.

Return Value

Int32
A signed integer that indicates the relative values of this instance and other.
Return ValueDescription
Less than zeroThis instance is smaller than other.
ZeroThis instance is equal to other.
Greater than zeroThis instance is greater than other.

Implements

IComparable<T>.CompareTo(T)

See Also