1182 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1189 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1192 P.
y = P.
x = 2 * cos(M_PI_4);
1196 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1207 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, sqrt(2.0), 0.000001);
1214 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 1, 0.000001);
1217 P.
x = -1.5; P.
y = 0;
1221 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1224 P.
x = -2.5; P.
y = 0;
1228 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1231 P.
y = -2.5; P.
x = 0;
1235 CU_ASSERT_DOUBLE_EQUAL(dl.
distance, 0.5, 0.000001);
1242 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.