PostGIS  2.4.9dev-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(), 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:54
POINT2D p1
Definition: measures.h:52
double tolerance
Definition: measures.h:56
double x
Definition: liblwgeom.h:328
#define DIST_MIN
Definition: measures.h:44
POINT2D p2
Definition: measures.h:53
double y
Definition: liblwgeom.h:328
int twisted
Definition: measures.h:55
double distance
Definition: measures.h:51
Here is the caller graph for this function: