Algorithm-RectanglesContainingDot_XS
view release on metacpan or search on metacpan
RectanglesContainingDot_XS.xs view on Meta::CPAN
int
subdivide_division(pTHX_ struct division *div) {
int size;
my_assert(div);
size = div->size;
if (size > MIN_DIVISION) {
struct rectangle **rects = div->rects;
double bestreq = 0.24 * size * size;
double bestx, bestxx, besty, bestyy;
int sizelx, sizerx, sizely, sizery;
bestx = find_best_cut(aTHX_ rects, size, 'x', &bestxx, &sizelx, &sizerx);
if (bestx > 0)
besty = find_best_cut(aTHX_ rects, size, 'y', &bestyy, &sizely, &sizery);
else
besty = 1;
( run in 0.634 second using v1.01-cache-2.11-cpan-7add2cbd662 )