[Input]
  _check_point_ shold be Vector3.
 [Output]
  return true if triangle contains _check_point_.
10912
def contains?( check_point )
      Util3D.check_arg_type(Vector3, check_point )
      plane = Plane.new( vertices[0], self.normal)
      distance, projected_point = plane.distance(check_point)
      return false if( distance > self.tolerance )
      g_coord = self.barycentric_coordinate(check_point)
      g_coord.each do |item|
        return false if( item < 0 or 1 < item)
      end
      return true
    end
1029537
private static boolean multiPointContainsPoint_(MultiPoint multipoint_a,
			Point point_b, double tolerance, ProgressTracker progress_tracker) {
		return !multiPointDisjointPoint_(multipoint_a, point_b, tolerance,
				progress_tracker);
	}
36849
def _is_kpoint(line):
    """"""
    # Try to parse the k-point; false otherwise
    toks = line.split()
    # k-point header lines have 4 tokens
    if len(toks) != 4:
        return False

    try:
        # K-points are centered at the origin
        xs = [float(x) for x in toks[:3]]
        # Weights are in [0,1]
        w = float(toks[3])
        return all(abs(x) <= 0.5 for x in xs) and w >= 0.0 and w <= 1.0
    except ValueError:
        return False
888421
public boolean hasVertex(float x, float y) {    	
    	if (points.length == 0) {
    		return false;
    	}
    	
    	checkPoints();
    	
    	for (int i=0;i<points.length;i+=2) {
    		if ((points[i] == x) && (points[i+1] == y)) {
    			return true;
    		}
    	}
    	
    	return false;
    }
85429
def contains?(x, y)
      points_distance(x1, y1, x, y) <= length &&
      points_distance(x2, y2, x, y) <= length &&
      (((@y2 - @y1) * x - (@x2 - @x1) * y + @x2 * @y1 - @y2 * @x1).abs / length) <= 0.5 * @width
    end
725951
def is_point_layer(layer):
    
    try:
        return (layer.type() == QgsMapLayer.VectorLayer) and (
            layer.geometryType() == QgsWkbTypes.PointGeometry)
    except AttributeError:
        return False
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;
	}
877376
def contains?(x, y)
      self_area = triangle_area(@x1, @y1, @x2, @y2, @x3, @y3)
      questioned_area =
        triangle_area(@x1, @y1, @x2, @y2, x, y) +
        triangle_area(@x2, @y2, @x3, @y3, x, y) +
        triangle_area(@x3, @y3, @x1, @y1, x, y)

      questioned_area <= self_area
    end
210370
def contains(self, location):
    
    for vertex in self.vertices:
      V = np.array((vertex['x'], vertex['y'], vertex['z'])).T
      if np.allclose(location, V, rtol=1.e-3):
        return "vertex"
    for face in self.faces:
      edges = np.choose(np.array(list(combinations(range(3),2))), self.vertices[face])
      for edge in edges:
        if self._containsOnEdge(location, edge):
          return "edge"
      if self._containsOnFace(location,face):
        return "face"
    return False
1110298
@Pure
	boolean containsControlPoint(Point3D p) {
		double x, y, z;
		for(int i=0; i<this.numCoordsProperty.get();) {
			x = this.coordsProperty[i++].get();
			y = this.coordsProperty[i++].get();
			z = this.coordsProperty[i++].get();
			if (x==p.getX() && y==p.getY() && z==p.getZ()) {
				return true;
			}
		}
		return false;
	}
65890
public boolean containsPoint(int x, int y) {

        return isInRangeInclusive(getLeft(), (getLeft() + getWidth()) - 1, x)
            && isInRangeInclusive(getTop(), (getTop() + getHeight()) - 1, y);
    }
467486
def vector_check(vector):
    
    for i in vector:
        if isinstance(i, int) is False:
            return False
        if i < 0:
            return False
    return True
927465
private static Triangle findnext1(Vector3 p, Triangle v) {
		if (!v.abnext.halfplane && PointLineTest.pointLineTest(v.a, v.b, p) == PointLinePosition.RIGHT)
			return v.abnext;
		if (!v.bcnext.halfplane && PointLineTest.pointLineTest(v.b, v.c, p) == PointLinePosition.RIGHT)
			return v.bcnext;
		if (!v.canext.halfplane && PointLineTest.pointLineTest(v.c, v.a, p) == PointLinePosition.RIGHT)
			return v.canext;
		if (PointLineTest.pointLineTest(v.a, v.b, p) == PointLinePosition.RIGHT)
			return v.abnext;
		if (PointLineTest.pointLineTest(v.b, v.c, p) == PointLinePosition.RIGHT)
			return v.bcnext;
		if (PointLineTest.pointLineTest(v.c, v.a, p) == PointLinePosition.RIGHT)
			return v.canext;
		return null;
	}
32090
public boolean contains(Coordinate coord) {
		if (coord.getX() < this.getX()) {
			return false;
		}
		if (coord.getY() < this.getY()) {
			return false;
		}
		if (coord.getX() > this.getEndPoint().getX()) {
			return false;
		}
		if (coord.getY() > this.getEndPoint().getY()) {
			return false;
		}
		return true;
	}
354451
def point_is_valid( generator, x, y ):
  """"""

  # These are the tests specified in X9.62.

  n = generator.order()
  curve = generator.curve()
  if x < 0 or n <= x or y < 0 or n <= y:
    return False
  if not curve.contains_point( x, y ):
    return False
  if not n*ellipticcurve.Point( curve, x, y ) == \
     ellipticcurve.INFINITY:
    return False
  return True
585451
function(tri,isFullShape){

		var isTriangle = function(){
			if(tri.a !== undefined && tri.b !== undefined && tri.c !== undefined){
				return (tri.a.x !== undefined);
			}
			return false;
		},
		isTriangle3D = function(){
			if(isTriangle()){
				return (tri.a.z !== undefined);
			}
			return false;
		};

		if(isFullShape || isFullShape === undefined){
			this.gfx.beginShape(this.app.TRIANGLES);
		}
		if(isTriangle3D()){
			var n = tri.computeNormal();
			this.gfx.normal(n.x,n.y,n.z);
			this.gfx.vertex(tri.a.x, tri.a.y, tri.a.z);
			this.gfx.vertex(tri.b.x, tri.b.y, tri.b.z);
			this.gfx.vertex(tri.c.x, tri.c.y, tri.c.z);
		} else { //should be Triangle2D
			this.gfx.vertex(tri.a.x,tri.a.y);
			this.gfx.vertex(tri.b.x,tri.b.y);
			this.gfx.vertex(tri.c.x,tri.c.y);
		}
    	if(isFullShape || isFullShape === undefined){
    		this.gfx.endShape();
    	}
	}
1345850
function(points, bbox) {
        for (var i = 0; i < points.length; i++) {
            if (this.bboxContainsPoint(points[i], bbox))
                return true;
        }
        return false;
    }