MCPcopy
hub / github.com/g3n/engine / ExpandByVector

Method ExpandByVector

math32/box2.go:128–133  ·  view source on GitHub ↗

ExpandByVector expands this bounding box by the specified vector. Returns pointer to this updated bounding box.

(vector *Vector2)

Source from the content-addressed store, hash-verified

126// ExpandByVector expands this bounding box by the specified vector.
127// Returns pointer to this updated bounding box.
128func (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.

Callers

nothing calls this directly

Calls 2

SubMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected