Files
games/common/geo/bounds.go
2025-09-06 09:32:53 -04:00

11 lines
215 B
Go

package geo
type Bounds struct {
Min Point
Width, Height int
}
func (b *Bounds) Contains(p Point) bool {
return p.X >= b.Min.X && p.X <= b.Min.X+b.Width && p.Y >= b.Min.Y && p.Y <= b.Min.Y+b.Height
}