mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
13 lines
199 B
Go
13 lines
199 B
Go
package main
|
|
|
|
type Rectangle struct {
|
|
x, y, width, height float64
|
|
}
|
|
|
|
func (r *Rectangle) containsBad(x, y float64) bool {
|
|
return r.x <= x &&
|
|
y <= y &&
|
|
x <= r.x+r.width &&
|
|
y <= r.y+r.height
|
|
}
|