ExpandByVector expands this bounding box by the specified vector. Returns pointer to this updated bounding box.
(vector *Vector2)
| 126 | // ExpandByVector expands this bounding box by the specified vector. |
| 127 | // Returns pointer to this updated bounding box. |
| 128 | func (b *Box2) ExpandByVector(vector *Vector2) *Box2 { |
| 129 | |
| 130 | b.min.Sub(vector) |
| 131 | b.max.Add(vector) |
| 132 | return b |
| 133 | } |
| 134 | |
| 135 | // ExpandByScalar expands this bounding box by the specified scalar. |
| 136 | // Returns pointer to this updated bounding box. |