AABB.pad constructor

AABB.pad(
  1. AABB from,
  2. double amount
)

Implementation

factory AABB.pad(AABB from, double amount) {
  var aabb = AABB.clone(from);
  aabb.left -= amount;
  aabb.right += amount;
  aabb.top -= amount;
  aabb.bottom += amount;
  return aabb;
}