Gimly / DoublyConnectedEdgeList

Implements a doubly connected edge list (DCEL) in C#
MIT License
6 stars 3 forks source link

Fix the query which gets the existing vertex #4

Closed thomashilke closed 3 years ago

thomashilke commented 3 years ago

The result dictionary contains ultimately all the points, therefore for each point there may be many entries in the dictionary that have a key close to the point. However, the Value associated to these points should be the same vertex.

The query cannot be expected to return a single result, so FirstOrDefault is the correct way to go, because all the elements selected should have the same Vertex, hence the first is a good as any.