1133 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1140 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1143 P.
y = P.
x = 2 * cos(M_PI_4);
1147 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1158 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, sqrt(2.0), 0.000001);
1165 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1168 P.
x = -1.5; P.
y = 0;
1172 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1175 P.
x = -2.5; P.
y = 0;
1179 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1182 P.
y = -2.5; P.
x = 0;
1186 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1193 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, sqrt(2.0)-1.0, 0.000001);
static LWGEOM * lwgeom_from_text(const char *str)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
void lwline_free(LWLINE *line)
void lw_dist2d_distpts_init(DISTPTS *dl, int mode)
int lw_dist2d_pt_ptarrayarc(const POINT2D *p, const POINTARRAY *pa, DISTPTS *dl)
Search all the arcs of pointarray to see which one is closest to p1 Returns minimum distance between ...
Structure used in distance-calculations.