Table of Contents

Class GeoPoint2D.GeoPoint2DICompareX

Namespace
CADability
Assembly
CADability.dll

Comparer that orders GeoPoint2D objects by their x-component only; points with equal x-components are considered equal regardless of y. Use with Sort(IComparer<T>). CompareX is the non-generic counterpart.

public class GeoPoint2D.GeoPoint2DICompareX : IComparer<GeoPoint2D>
Inheritance
GeoPoint2D.GeoPoint2DICompareX
Implements
Inherited Members

Constructors

GeoPoint2DICompareX()

Creates the comparer. It has no state.

public GeoPoint2DICompareX()

Methods

Compare(GeoPoint2D, GeoPoint2D)

Compares the x-components of the two points.

public int Compare(GeoPoint2D x, GeoPoint2D y)

Parameters

x GeoPoint2D

first point

y GeoPoint2D

second point

Returns

int

-1 if the x-component of x is smaller, 1 if it is greater, 0 if both are equal