Check if position is in middle circle (press region)

@param x x position
@param y y position
@return true if in middle circle, false otherwise
168836
private boolean isInMiddleCircle(float x, float y) {
        return GearWearableUtility.isInCircle(x, y, CENTER_X, CENTER_Y, MIDDLE_RADIUS);
    }
864017
@Pure
	public BusItineraryHalt getNearestBusHalt(double x, double y) {
		double distance = Double.POSITIVE_INFINITY;
		BusItineraryHalt besthalt = null;
		double dist;

		for (final BusItineraryHalt halt : this.validHalts) {
			dist = halt.distance(x, y);
			if (dist < distance) {
				distance = dist;
				besthalt = halt;
			}
		}

		return besthalt;
	}
947663
function(x, y) {
    var proj = jvm.WorldMap.maps[this.params.map].projection,
        centralMeridian = proj.centralMeridian,
        insets = jvm.WorldMap.maps[this.params.map].insets,
        i,
        inset,
        bbox,
        nx,
        ny;

    for (i = 0; i < insets.length; i++) {
      inset = insets[i];
      bbox = inset.bbox;

      nx = x - (this.transX*this.scale + inset.left*this.scale);
      ny = y - (this.transY*this.scale + inset.top*this.scale);

      nx = (nx / (inset.width * this.scale)) * (bbox[1].x - bbox[0].x) + bbox[0].x;
      ny = (ny / (inset.height * this.scale)) * (bbox[1].y - bbox[0].y) + bbox[0].y;

      if (nx > bbox[0].x && nx < bbox[1].x && ny > bbox[0].y && ny < bbox[1].y) {
        return jvm.Proj[proj.type + '_inv'](nx, -ny, centralMeridian);
      }
    }

    return false;
  }
288307
def check_hit(self, x, y):
        """"""
        extents = self.get_extents()

        if not extents:
            return False

        if extents.x <= x <= extents.x + extents.width and extents.y <= y <= extents.y + extents.height:
            return self._stroke_context is None or self._stroke_context.in_fill(x, y)
        else:
            return False
303430
public static boolean contains(double[][] polygon, double x, double y) {
        if (polygon.length <= 2) {
            return false;
        }

        int hits = 0;

        int n = polygon.length;
        double lastx = polygon[n - 1][0];
        double lasty = polygon[n - 1][1];
        double curx, cury;

        // Walk the edges of the polygon
        for (int i = 0; i < n; lastx = curx, lasty = cury, i++) {
            curx = polygon[i][0];
            cury = polygon[i][1];

            if (cury == lasty) {
                continue;
            }

            double leftx;
            if (curx < lastx) {
                if (x >= lastx) {
                    continue;
                }
                leftx = curx;
            } else {
                if (x >= curx) {
                    continue;
                }
                leftx = lastx;
            }

            double test1, test2;
            if (cury < lasty) {
                if (y < cury || y >= lasty) {
                    continue;
                }
                if (x < leftx) {
                    hits++;
                    continue;
                }
                test1 = x - curx;
                test2 = y - cury;
            } else {
                if (y < lasty || y >= cury) {
                    continue;
                }
                if (x < leftx) {
                    hits++;
                    continue;
                }
                test1 = x - lastx;
                test2 = y - lasty;
            }

            if (test1 < (test2 / (lasty - cury) * (lastx - curx))) {
                hits++;
            }
        }

        return ((hits & 1) != 0);
    }
1102343
public boolean get(int x, int y) {
    int offset = y * rowSize + (x / 32);
    return ((bits[offset] >>> (x & 0x1f)) & 1) != 0;
  }
116386
public void setSliderPosition(float x, float y) {

        if (x > 255) {
            x = 255;
        }
        if (x < 0) {
            x = 0;
        }
        if (y > 255) {
            y = 255;
        }
        if (y < 0) {
            y = 0;
        }
        x -= 7;
        y -= 7;
        m_slider.getElement().getStyle().setLeft(x, Unit.PX);
        m_slider.getElement().getStyle().setTop(y, Unit.PX);
    }
964353
public void setPosition(double x, double y, double z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}
416419
function (x, y, r) {
		var circle = this.symbol('circle');
		if (isObject(x)) {
			r = x.r;
			y = x.y;
			x = x.x;
		}
		circle.isCircle = true; // Causes x and y to mean center (#1682)
		circle.r = r;
		return circle.attr({ x: x, y: y });
	}
838605
public function isValidBound($x, $y) {
        list($r, $g, $b) = $this->shapeImage->getRGB($x, $y);
        return $r < 240 || $g < 240 || $b < 240;
    }
499584
protected boolean intersectsX (IRay3 ray, float x) {
        IVector3 origin = ray.origin(), dir = ray.direction();
        float t = (x - origin.x()) / dir.x();
        if (t < 0f) {
            return false;
        }
        float iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z();
        return iy >= _minExtent.y && iy <= _maxExtent.y &&
            iz >= _minExtent.z && iz <= _maxExtent.z;
    }
1183811
@Override
    public void setLedPosition(final double X, final double Y) {
        ledPosition.setLocation(X, Y);
        repaint(getInnerBounds());
    }
1016605
private boolean isViewHit(View view, int x, int y) {
    int[] viewLocation = new int[2];
    view.getLocationOnScreen(viewLocation);
    int[] parentLocation = new int[2];
    this.getLocationOnScreen(parentLocation);
    int screenX = parentLocation[0] + x;
    int screenY = parentLocation[1] + y;
    return screenX >= viewLocation[0]
        && screenX < viewLocation[0] + view.getWidth()
        && screenY >= viewLocation[1]
        && screenY < viewLocation[1] + view.getHeight();
  }
553279
public boolean containsExclusive(double x, double y) {
		// Note: This will return False, if envelope is empty, thus no need to
		// call is_empty().
		return x > xmin && x < xmax && y > ymin && y < ymax;
	}
66398
public boolean pointAtLight(float x, float y) {
		for (Light light : lightList) {
			if (light.contains(x, y)) return true;
		}
		return false;
	}
142732
public void setPosition(Coordinate position) {
		if (getOriginalLocation() != null) {
			Bbox oldBounds = (Bbox) getOriginalLocation();
			Bbox newBounds = (Bbox) oldBounds.clone();
			newBounds.setCenterPoint(position);
			setOriginalLocation(newBounds);
		} else {
			setOriginalLocation(new Bbox(position.getX(), position.getY(), 0, 0));
		}
	}
244347
public boolean walkToY(int y)
	{
		if (this.y + lineHeight > y)
			return true;
		while (nextLine())
			if (this.y + lineHeight > y)
				return true;
		return false;
	}