1141 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1148 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1151 P.
y = P.
x = 2 * cos(M_PI_4);
1155 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1166 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, sqrt(2.0), 0.000001);
1173 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1176 P.
x = -1.5; P.
y = 0;
1180 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1183 P.
x = -2.5; P.
y = 0;
1187 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1190 P.
y = -2.5; P.
x = 0;
1194 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1201 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.