21#include <geos/constants.h>
22#include <geos/geom/Coordinate.h>
41 distanceSquared(DoubleNotANumber),
56 distanceSquared = p0.distanceSquared(p1);
63 return std::sqrt(distanceSquared);
66 const std::array<geom::Coordinate, 2>&
67 getCoordinates()
const
73 getCoordinate(std::size_t i)
const
75 assert(i < pt.size());
82 setMaximum(ptDist.pt[0], ptDist.pt[1]);
92 double distSq = p0.distanceSquared(p1);
93 if(distSq > distanceSquared) {
94 initialize(p0, p1, distSq);
101 setMinimum(ptDist.pt[0], ptDist.pt[1]);
111 double distSq = p0.distanceSquared(p1);
112 if(distSq < distanceSquared) {
113 initialize(p0, p1, distSq);
137 distanceSquared = distSquared;
141 std::array<geom::Coordinate, 2> pt;
143 double distanceSquared;
Definition: PointPairDistance.h:36
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Basic namespace for all GEOS functionalities.
Definition: geos.h:39