PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ lw_dist2d_distpts_init()

void lw_dist2d_distpts_init ( DISTPTS dl,
int  mode 
)

Definition at line 67 of file measures.c.

References DIST_MIN, DISTPTS::distance, DISTPTS::mode, DISTPTS::p1, DISTPTS::p2, DISTPTS::tolerance, DISTPTS::twisted, POINT2D::x, and POINT2D::y.

Referenced by lw_dist2d_seg_arc(), rect_leaf_node_distance(), rect_leaf_node_intersects(), test_lw_dist2d_arc_arc(), test_lw_dist2d_pt_arc(), test_lw_dist2d_pt_ptarrayarc(), test_lw_dist2d_ptarray_ptarrayarc(), and test_lw_dist2d_seg_arc().

68 {
69  dl->twisted = -1;
70  dl->p1.x = dl->p1.y = 0.0;
71  dl->p2.x = dl->p2.y = 0.0;
72  dl->mode = mode;
73  dl->tolerance = 0.0;
74  if ( mode == DIST_MIN )
75  dl->distance = FLT_MAX;
76  else
77  dl->distance = -1 * FLT_MAX;
78 }
int mode
Definition: measures.h:51
POINT2D p1
Definition: measures.h:49
double tolerance
Definition: measures.h:53
double x
Definition: liblwgeom.h:330
#define DIST_MIN
Definition: measures.h:41
POINT2D p2
Definition: measures.h:50
double y
Definition: liblwgeom.h:330
int twisted
Definition: measures.h:52
double distance
Definition: measures.h:48
Here is the caller graph for this function: