Move growBoundingBox to utils.js

This commit is contained in:
Skyler Lehmkuhl 2025-01-10 18:27:10 -05:00
parent 112de7ed1a
commit 596dd9501c
1 changed files with 7 additions and 0 deletions

View File

@ -163,6 +163,13 @@ function multiplyMatrices(a, b) {
return result; return result;
} }
function growBoundingBox(bboxa, bboxb) {
bboxa.x.min = Math.min(bboxa.x.min, bboxb.x.min);
bboxa.y.min = Math.min(bboxa.y.min, bboxb.y.min);
bboxa.x.max = Math.max(bboxa.x.max, bboxb.x.max);
bboxa.y.max = Math.max(bboxa.y.max, bboxb.y.max);
}
function floodFillRegion( function floodFillRegion(
startPoint, startPoint,
epsilon, epsilon,