Files
codeql/ql/src/RedundantCode/CompareIdenticalValues.go
2019-11-08 12:16:26 +00:00

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
}