Searches around the current c1 point for the best place to put the corner

@return location of best corner in local search region
960375
protected int optimize( List<Point2D_I32> contour , int c0,int c1,int c2 ) {

		double bestDistance = computeCost(contour,c0,c1,c2,0);
		int bestIndex = 0;
		for( int i = -searchRadius; i <= searchRadius; i++ ) {
			if( i == 0 ) {
				// if it found a better point in the first half stop the search since that's probably the correct
				// direction.  Could be improved by remember past search direction
				if( bestIndex != 0 )
					break;
			} else {
				double found = computeCost(contour, c0, c1, c2, i);
				if (found < bestDistance) {
					bestDistance = found;
					bestIndex = i;
				}
			}
		}
		return CircularIndex.addOffset(c1, bestIndex, contour.size());
	}
362385
private CmsPoint getCropCenter() {

        CmsCroppingParamBean crop = m_croppingProvider.get();
        CmsImageInfoBean info = m_imageInfoProvider.get();
        if ((crop == null) || !crop.isCropped()) {
            return new CmsPoint(info.getWidth() / 2, info.getHeight() / 2);
        } else {
            return new CmsPoint(
                crop.getCropX() + (crop.getCropWidth() / 2),
                crop.getCropY() + (crop.getCropHeight() / 2));
        }
    }
10619
@Override
	public int getLocationY() throws WidgetException {
		try {
			Point p = findElement().getLocation();
			return p.getY();
		} catch (Exception e) {
			throw new WidgetException("Error while fetching Y location", locator, e);
		}
	}
894300
public static Location location(int start, int end, Strand strand, int length) {
		int min = Math.min(start, end);
		//if this is true then we have a coord on the +ve strand even though Strand could be negative
		boolean isReverse = (min != start);
		if (isReverse) {
			return new SimpleLocation(
					new SimplePoint(start).reverse(length),
					new SimplePoint(end).reverse(length),
					strand);
		}
		return new SimpleLocation(start, end, strand);
	}
995170
@Transient
    public String getPlaceId() {
        final Feature location = getLocation();
        if (location == null) {
            return null;
        }
        return location.getProperty("placeId");
    }
110131
protected SVGPoint getCoordinates(Event evt) {
    return SVGUtil.elementCoordinatesFromEvent(this.svgp.getDocument(), this.coordref, evt);
  }
573481
public int getAbsolutePosition() {
        int pos = position;
        AstNode parent = this.parent;
        while (parent != null) {
            pos += parent.getPosition();
            parent = parent.getParent();
        }
        return pos;
    }
258261
private Node findBestLeafNode(ClusKernel newPoint) {
    	double minDist = Double.MAX_VALUE;
    	Node bestFit = null;
    	for (Node e: collectLeafNodes(root)){
    		if (newPoint.calcDistance(e.nearestEntry(newPoint).getData())<minDist){
    			bestFit = e;
    			minDist = newPoint.calcDistance(e.nearestEntry(newPoint).getData());
    		}
    	}
    	if (bestFit!=null)
    		return bestFit;
    	else
    		return root;
	}
233051
public URI getLocation() {
        if (locationURI == null) {
            locationURI = moduleRef != null ? moduleRef.getLocation() : null;
            if (locationURI == null) {
                locationURI = classpathElement.getURI();
            }
        }
        return locationURI;
    }
56934
function getSentinelPosition(stickyElement, sentinel, className) {
  const stickyStyle = window.getComputedStyle(stickyElement);
  const parentStyle = window.getComputedStyle(stickyElement.parentElement);

  switch (className) {
    case ClassName.SENTINEL_TOP:
      return {
        top: `calc(${stickyStyle.getPropertyValue('top')} * -1)`,
        height: 0,
      };

    case ClassName.SENTINEL_BOTTOM:
      const parentPadding = parseInt(parentStyle.paddingTop);

      return {
        bottom: stickyStyle.top,
        height: `${stickyElement.getBoundingClientRect().height + parentPadding}px`,
      };
  }
}
784055
private static Point getCursorLocation()
    {
        try
        {
            final PointerInfo a = MouseInfo.getPointerInfo();
            final java.awt.Point b = a.getLocation();
            return new Point((int) b.getX(), (int) b.getY());
        }
        catch (final HeadlessException exception)
        {
            Verbose.exception(exception);
            return new Point();
        }
    }
15555
public Location getLocationAtEntry() {
        InstructionHandle handle = getEntry().getFirstInstruction();
        assert handle != null;
        return new Location(handle, getEntry());
    }
133319
public Point getEndPos ()
    {
        return new Point(
            (int)(_center.x + Math.round(Math.cos(_sangle + _delta) * _xradius)),
            (int)(_center.y + Math.round(Math.sin(_sangle + _delta) * _yradius)));
    }
502777
def search_point(self, point, result):
        
        for k in self.s_center:
            if k.begin <= point < k.end:
                result.add(k)
        if point < self.x_center and self[0]:
            return self[0].search_point(point, result)
        elif point > self.x_center and self[1]:
            return self[1].search_point(point, result)
        return result
307808
int selectCorner( GridInfo info ) {

		info.lookupGridCorners(cornerList);

		int bestCorner = -1;
		double bestScore = Double.MAX_VALUE;
		boolean bestIsCornerSquare = false;

		for (int i = 0; i < cornerList.size(); i++) {
			Node n = cornerList.get(i);

			boolean corner = isCornerValidOrigin(n);

			// If there are no corner points which are valid corners, then any corner can be the origin if
			// allowNoCorner is true
			if( corner || (allowNoCorner && !bestIsCornerSquare) ) {
				// sanity check the shape
				if( checkShape != null ) {
					if( i%2==0 ) {
						if( !checkShape.isValidShape(info.rows,info.cols)) {
							continue;
						}
					} else {
						if( !checkShape.isValidShape(info.cols,info.rows)) {
							continue;
						}
					}
				}

				// If the distance is to (0,0) pixel is smaller or this is a corner square and the other best
				// is not a corner square
				double distance = n.normSq();
				if( distance < bestScore || (!bestIsCornerSquare && corner )) {
					bestIsCornerSquare |= corner;
					bestScore = distance;
					bestCorner = i;
				}
			}
		}
		info.hasCornerSquare = bestIsCornerSquare;
		return bestCorner;
	}
542607
public Coordinate[] getCoordinates() {
		if (isEmpty()) {
			return null;
		}
		int len = getNumPoints();
		Coordinate[] coordinates = new Coordinate[len];
		int count;
		for (count = 0; count < exteriorRing.getNumPoints(); count++) {
			coordinates[count] = exteriorRing.getCoordinateN(count);
		}
		if (interiorRings != null) {
			for (LinearRing interiorRing : interiorRings) {
				for (int n = 0; n < interiorRing.getNumPoints(); n++) {
					coordinates[count++] = interiorRing.getCoordinateN(n);
				}
			}
		}
		return coordinates;
	}
246622
@Pure
	public GeoLocationPoint getGeoPosition() {
		final Point2d p = getPosition2D();
		if (p != null) {
			return new GeoLocationPoint(p.getX(), p.getY());
		}
		return null;
	}