[This is preliminary documentation and is subject to change.]

Compares two priority items and returns a value indicating whether one is less than, equal to, or greater than the other.

Namespace: org.critterai
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public int Compare(
	T x,
	T y
)
Public Function Compare ( _
	x As T, _
	y As T _
) As Integer
public:
virtual int Compare(
	T x, 
	T y
) sealed

Parameters

x
T
A priority item.
y
T
A priority item.

Return Value

The comparision result. (See remarks.)

Implements

IComparer<(Of <(<'T>)>)>..::..Compare(T, T)

Remarks

Returns zero if the priorities are equal.

If ascending, returns -1 if x is less than y, and 1 if x is greater than y.

If descending, return -1 if x is greater than y, and 1 if x is less than y.

See Also