Finds a triangle near the given point

@param point a query point
@return a triangle at the same cell of the point
171031
public Triangle findCellTriangleOf(Point3D point) {
        int x_index = (int) ((point.x - indexRegion.minX()) / x_size);
        int y_index = (int) ((point.y - indexRegion.minY()) / y_size);
        return grid[x_index][y_index];
    }
1344074
function(geometry) {
        var intersect = false;
        if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
            intersect = this.equals(geometry);
        } else {
            intersect = geometry.intersects(this);
        }
        return intersect;
    }
968720
@Override
	@Pure
	public final P getNearest(Point2D<?, ?> position) {
		final Pair<P, Double> data = getNearestData(position.getX(), position.getY());
		if (data != null) {
			return data.getKey();
		}
		return null;
	}
428658
public AVIMConversationsQuery whereNear(String key, AVGeoPoint point) {
    conditions.whereNear(key, point);
    return this;
  }
1138422
private Point asPoint(List coords, CrsId crsId) throws IOException {
        if (coords != null && coords.size() >= 2) {
            ArrayList<List> coordinates = new ArrayList<List>();
            coordinates.add(coords);
            return new Point(getPointSequence(coordinates, crsId));
        } else {
            throw new IOException("A point must has exactly one coordinate (an x, a y and possibly a z value). Additional numbers in the coordinate are permitted but ignored.");
        }
    }
560296
public Point toWgs84(Point point) {
        if (projection != null) {
            point = toWgs84.transform(point);
        }
        return point;
    }
735917
private Point translate(Point point) {
		Coordinate c = point.getCoordinate();
		return point.getGeometryFactory().createPoint(new Coordinate(c.getX() + translateX, c.getY() + translateY));
	}
669759
public Criteria within(Point location, @Nullable Distance distance) {
		Assert.notNull(location, "Location must not be null!");
		assertPositiveDistanceValue(distance);
		predicates.add(
				new Predicate(OperationKey.WITHIN, new Object[] { location, distance != null ? distance : new Distance(0) }));
		return this;
	}
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
247209
@Pure
	public double distanceSquaredLine(Point3D point) {
		return distanceSquaredLinePoint(
				getX1(), getY1(), getZ1(),
				getX2(), getY2(), getZ2(),
				point.getX(), point.getY(), point.getZ());
	}
1069695
@Pure
	public boolean containsPoint(Point2D<?, ?> point, int groupIndex) {
		final int grpCount = getGroupCount();
		if (groupIndex < 0) {
			throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
		}
		if (groupIndex > grpCount) {
			throw new IndexOutOfBoundsException(groupIndex + ">" + grpCount); //$NON-NLS-1$
		}
		if (point == null) {
			return false;
		}

		for (int i = 0; i < getPointCountInGroup(groupIndex); ++i) {
			final Point2d cur = getPointAt(groupIndex, i);
			if (cur.epsilonEquals(point, MapElementConstants.POINT_FUSION_DISTANCE)) {
				return true;
			}
		}
		return false;
	}
518868
function (point, pred) {
            while (point) {
                if (pred(point)) {
                    return point;
                }

                point = nextPoint(point);
            }

            return null;
        }
1082626
function(point) {
                if (!this.contains(point)) { return null; }
                var P = point.elements || point;
                var A = this.anchor.elements, D = this.direction.elements;
                return (P[0] - A[0]) * D[0] + (P[1] - A[1]) * D[1] + ((P[2] || 0) - A[2]) * D[2];
              }
826099
public KdTree.Node requestNode(P point , int index ) {
		KdTree.Node n = requestNode();
		n.point = point;
		n.index = index;
		n.split = -1;
		return n;
	}
1115074
private Point parsePoint(String point) {
    int comma = point.indexOf(',');
    if (comma == -1)
      return null;

    float lat = Float.valueOf(point.substring(0, comma));
    float lng = Float.valueOf(point.substring(comma + 1));
    return spatialctx.makePoint(lng, lat);
  }
618301
def nodeAt( self, point ):
        
        items = self.items(point)
        for item in items:
            if ( isinstance(item, XNode) ):
                return item
        return None
177410
public List<Triangle> findTriangleNeighborhood(Triangle firstTriangle, Vector3 point) {
		List<Triangle> triangles = new ArrayList<Triangle>(30);
		triangles.add(firstTriangle);

		Triangle prevTriangle = null;
		Triangle currentTriangle = firstTriangle;
		Triangle nextTriangle = currentTriangle.nextNeighbor(point, prevTriangle);

		while (!nextTriangle.equals(firstTriangle)) {
			//the point is on the perimeter
			if(nextTriangle.isHalfplane()) {
				return null;
			}

			triangles.add(nextTriangle);
			prevTriangle = currentTriangle;
			currentTriangle = nextTriangle;
			nextTriangle = currentTriangle.nextNeighbor(point, prevTriangle);
		}

		return triangles;
	}