Class DistanceComparer
A comparer used to order collections of points based on their distance from a provided point.
Inheritance
System.Object
DistanceComparer
Implements
System.Collections.Generic.IComparer<Vector3>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Elements.Search
Assembly: Hypar.Elements.dll
Syntax
public class DistanceComparer : IComparer<Vector3>
Constructors
DistanceComparer(Vector3)
Construct an event comparer.
Declaration
public DistanceComparer(Vector3 v)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | v | The vector against which to compare. |
Methods
Compare(Vector3, Vector3)
Compare two points.
Declaration
public int Compare(Vector3 x, Vector3 y)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | x | The first point. |
Vector3 | y | The second point. |
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.Collections.Generic.IComparer<T>