PostGIS  2.5.0dev-r@@SVN_REVISION@@
double distance2d_sqr_pt_pt ( const POINT2D p1,
const POINT2D p2 
)

Definition at line 2322 of file measures.c.

References POINT2D::x, and POINT2D::y.

Referenced by distance2d_sqr_pt_seg(), lw_dist2d_arc_arc_concentric(), lwgeom_cluster_2d_kmeans(), lwgeom_remove_repeated_points_in_place(), ptarray_remove_repeated_points_in_place(), and update_r().

2323 {
2324  double hside = p2->x - p1->x;
2325  double vside = p2->y - p1->y;
2326 
2327  return hside*hside + vside*vside;
2328 
2329 }
double x
Definition: liblwgeom.h:327
double y
Definition: liblwgeom.h:327

Here is the caller graph for this function: