33#define GEOMPROCS_API __declspec(dllexport)
35#define GEOMPROCS_API __declspec(dllimport)
64#define EXPANDBB(b0, b1) \
65 (_Generic((b0), box *: expandbb, boxf *: expandbbf)((b0), (b1)))
110 r.
x = (p.
x + q.
x) / 2.;
111 r.
y = (p.
y + q.
y) / 2.;
119 r.
x = p.
x + t * (q.
x - p.
x);
120 r.
y = p.
y + t * (q.
y - p.
y);
geometric types and macros (e.g. points and boxes)
static pointf mid_pointf(pointf p, pointf q)
static void expandbp(boxf *b, pointf p)
expand box b as needed to enclose point p
static point add_point(point p, point q)
static pointf add_pointf(pointf p, pointf q)
static pointf sub_pointf(pointf p, pointf q)
static point exch_xy(point p)
GEOMPROCS_API pointf cwrotatepf(pointf p, int cwrot)
static pointf scale(double c, pointf p)
GEOMPROCS_API int lineToBox(pointf p1, pointf p2, boxf b)
GEOMPROCS_API pointf ccwrotatepf(pointf p, int ccwrot)
GEOMPROCS_API boxf flip_rec_boxf(boxf b, pointf p)
static pointf exch_xyf(pointf p)
static bool boxf_overlap(boxf b0, boxf b1)
static pointf interpolate_pointf(double t, pointf p, pointf q)
static void expandbbf(boxf *b0, boxf b1)
static pointf perp(pointf p)
GEOMPROCS_API double ptToLine2(pointf l1, pointf l2, pointf p)
static void expandbb(box *b0, box b1)
expand box b0 as needed to enclose box b1
GEOMPROCS_API void rect2poly(pointf *p)
GEOMPROCS_API int line_intersect(pointf a, pointf b, pointf c, pointf d, pointf *p)