operator + method

Box operator +(
  1. Position addend
)

Returns a bounding box with min and max coordinate values of this summed with coordinate values of addend.

Examples:

// Returns: `Box.create(minX: 3.0, minY: 0.0, maxX: 4.0, maxY: 1.0))`
Box.create(minX: 1.0, minY: 1.0, maxX: 2.0, maxY: 2.0) +
  Position.create(x: 2.0, y: -1.0);

Implementation

Box operator +(Position addend) =>
    cartesianBoxSum(this, addend, to: conforming.box);