Class DistanceComparer<TValue>
public class DistanceComparer<TValue> : IComparer<TValue>
Type Parameters
TValue
- Inheritance
-
DistanceComparer<TValue>
- Implements
-
IComparer<TValue>
- Inherited Members
Constructors
DistanceComparer(Vector3, Func<TValue, Vector3>, bool, bool)
public DistanceComparer(Vector3 position, Func<TValue, Vector3> getPosition, bool horizontalDistanceOnly, bool reverse)
Parameters
Methods
Compare(TValue, TValue)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(TValue a, TValue b)
Parameters
aTValuebTValue
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.
ValueMeaning
Less than zero
xis less thany.Zero
xequalsy.Greater than zero
xis greater thany.