Skip to content
util.go 308 B
Newer Older
	"github.com/faiface/pixel"
)

faiface's avatar
faiface committed
func intBounds(bounds pixel.Rect) (x, y, w, h int) {
	x0 := int(math.Floor(bounds.Min.X()))
	y0 := int(math.Floor(bounds.Min.Y()))
	x1 := int(math.Ceil(bounds.Max.X()))
	y1 := int(math.Ceil(bounds.Max.Y()))
	return x0, y0, x1 - x0, y1 - y0