Uređivanje

Dijeli putem


Half.CompareTo Method

Definition

Overloads

CompareTo(Half)

Compares this instance to a specified half-precision floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified half-precision floating-point number.

CompareTo(Object)

Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.

CompareTo(Half)

Source:
Half.cs
Source:
Half.cs
Source:
Half.cs

Compares this instance to a specified half-precision floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified half-precision floating-point number.

public:
 virtual int CompareTo(Half other);
public int CompareTo (Half other);
abstract member CompareTo : Half -> int
override this.CompareTo : Half -> int
Public Function CompareTo (other As Half) As Integer

Parameters

other
Half

A half-precision floating-point number to compare.

Returns

A value less than zero if this is less than other, zero if this is equal to other, or a value greater than zero if this is greater than other.

Implements

Applies to

CompareTo(Object)

Source:
Half.cs
Source:
Half.cs
Source:
Half.cs

Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.

public:
 virtual int CompareTo(System::Object ^ obj);
public int CompareTo (object? obj);
abstract member CompareTo : obj -> int
override this.CompareTo : obj -> int
Public Function CompareTo (obj As Object) As Integer

Parameters

obj
Object

An object to compare, or null.

Returns

A value less than zero if this instance is less than obj, or this instance is not a number (NaN) and obj is a number.

-or-

Zero if this instance is equal to obj, or this instance and obj are both not a number (NaN), PositiveInfinity, or NegativeInfinity.

-or-

A value greater than zero if this instance is greater than obj, or this instance is a number and obj is not a number (NaN), or obj is null.

Implements

Exceptions

obj is not of type Half.

Applies to