AABB.expand constructor
Implementation
factory AABB.expand(AABB from, double amount) {
var aabb = AABB.clone(from);
if (aabb.width < amount) {
aabb.left -= amount / 2;
aabb.right += amount / 2;
}
if (aabb.height < amount) {
aabb.top -= amount / 2;
aabb.bottom += amount / 2;
}
return aabb;
}