blob: ff8bfb18634ed0c80a6c82d5a569b41fbf9bb16b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
package structs
// BoundingBox is a struct defining the spatial outreach of a box
type BoundingBox struct {
Center Vec2 // Center of the box
Width float64 // Width of the box
}
// NewBoundingBox returns a new Bounding Box using the centerpoint and the width given by the function parameters
func NewBoundingBox(center Vec2, width float64) BoundingBox {
return BoundingBox{Center: center, Width: width}
}
|