HGeometry also includes a datastructure/data type for planar graphs. In particular, it has a EdgeOracle data structure, that can be built in (O(n)) time that can test if the graph contains an edge in constant time. All geometry types are parameterized by a numerical type r. It is well known that Floating-point arithmetic and Geometric algorithms don't go well together; i.e. because of floating point errors one may get completely wrong results. Hence, I strongly advise against using Double or Float for these types. In several algorithms it is sufficient if the type r is Fractional. Hence, you can use an exact number type such as Rational.