dist
is the distance between the inner boundaries and the outer boundaries.
var p = new Point[Int](5,10)
var b = p.padded(3)
assert b.left == 2 and b.right == 8 and b.top == 13 and b.bottom == 7
# Create a bounding box that encloses the actual bounding box.
# `dist` is the distance between the inner boundaries and the outer boundaries.
# ~~~
# var p = new Point[Int](5,10)
# var b = p.padded(3)
# assert b.left == 2 and b.right == 8 and b.top == 13 and b.bottom == 7
# ~~~
fun padded(dist: N): Box[N] do return new Box[N].lrtb(left - dist, right + dist, top + dist, bottom - dist)
lib/geometry/boxes.nit:78,2--85,108