mirror of
https://github.com/github/codeql.git
synced 2026-01-28 13:53:10 +01:00
13 lines
282 B
JavaScript
13 lines
282 B
JavaScript
function Rectangle(x, y, width, height) {
|
|
this.x = x;
|
|
this.y = y;
|
|
this.width = width;
|
|
this.height = height;
|
|
}
|
|
|
|
Rectangle.prototype.contains = function(x, y) {
|
|
return (this.x <= x &&
|
|
x < this.x+this.width) &&
|
|
(this.y <= y &&
|
|
y < this.y+this.height);
|
|
}; |