some refinement and beginning of a table element
This commit is contained in:
10
common/geo/bounds.go
Normal file
10
common/geo/bounds.go
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user