Determines whether a point is inside this rectangle (edge included).
@function
@param {OpenSeadragon.Point} point
@param {Number} [epsilon=0] the margin of error allowed
@returns {Boolean} true if the point is inside this rectangle, false
otherwise.
770764
function(point, epsilon) {
        epsilon = epsilon || 0;

        // See http://stackoverflow.com/a/2752754/1440403 for explanation
        var topLeft = this.getTopLeft();
        var topRight = this.getTopRight();
        var bottomLeft = this.getBottomLeft();
        var topDiff = topRight.minus(topLeft);
        var leftDiff = bottomLeft.minus(topLeft);

        return ((point.x - topLeft.x) * topDiff.x +
            (point.y - topLeft.y) * topDiff.y >= -epsilon) &&

            ((point.x - topRight.x) * topDiff.x +
            (point.y - topRight.y) * topDiff.y <= epsilon) &&

            ((point.x - topLeft.x) * leftDiff.x +
            (point.y - topLeft.y) * leftDiff.y >= -epsilon) &&

            ((point.x - bottomLeft.x) * leftDiff.x +
            (point.y - bottomLeft.y) * leftDiff.y <= epsilon);
    }
561049
def contains_point(self, p):
        
        for iv in self.s_center:
            if iv.contains_point(p):
                return True
        branch = self[p > self.x_center]
        return branch and branch.contains_point(p)
594707
def contains_point( self, x, y ):
    """"""
    return ( y * y - ( x * x * x + self.__a * x + self.__b ) ) % self.__p == 0
1228010
function(obj) {
                if (this.intersects(obj) || this.contains(obj)) { return 0; }
                if (obj.anchor) {
                  // obj is a plane or line
                  var A = this.anchor.elements, B = obj.anchor.elements, N = this.normal.elements;
                  return Math.abs((A[0] - B[0]) * N[0] + (A[1] - B[1]) * N[1] + (A[2] - B[2]) * N[2]);
                } else {
                  // obj is a point
                  var P = obj.elements || obj;
                  var A = this.anchor.elements, N = this.normal.elements;
                  return Math.abs((A[0] - P[0]) * N[0] + (A[1] - P[1]) * N[1] + (A[2] - (P[2] || 0)) * N[2]);
                }
              }
465143
function pointRectangleSimple(p, a1, a2) {
    if (!(a1.x > p.x ||
        a2.x < p.x ||
        a1.y > p.y ||
        a2.y < p.y))
        return {result: collision.INSIDE};
    return {result: collision.OUTSIDE};
}
623840
public static boolean epsilonEquals (IPoint p1, IPoint p2) {
        return epsilonEquals(p1, p2, MathUtil.EPSILON);
    }
1088176
def contains_point?(point)
      return false unless inside_bounding_box?(point)
      c = false
      i = -1
      j = size - 1
      while (i += 1) < size
        if (self[i].y <= point.y && point.y < self[j].y) ||
           (self[j].y <= point.y && point.y < self[i].y)
          if point.x < (self[j].x - self[i].x) * (point.y - self[i].y) / (self[j].y - self[i].y) + self[i].x
            c = !c
          end
        end
        j = i
      end
      c
    end
683527
function (point) {
            if (!isText(point.node)) {
                return false;
            }

            var ch = point.node.nodeValue.charAt(point.offset - 1);
            return ch && (ch !== ' ' && ch !== NBSP_CHAR);
        }
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];
              }
219292
def contains(self, point):
    
    return (
          point[0] >= self.minpt[0] 
      and point[1] >= self.minpt[1]
      and point[2] >= self.minpt[2] 
      and point[0] <= self.maxpt[0] 
      and point[1] <= self.maxpt[1]
      and point[2] <= self.maxpt[2]
    )
1008366
public function inside(QtiPoint $point)
    {
        if ($this->getShape() === QtiShape::DEF) {
            return true;
        } elseif ($this->getShape() === QtiShape::RECT) {
            return $point->getX() >= $this[0] && $point->getX() <= $this[2] && $point->getY() >= $this[1] && $point->getY() <= $this[3];
        } elseif ($this->getShape() === QtiShape::CIRCLE) {
            return pow($point->getX() - $this[0], 2) + pow($point->getY() - $this[1], 2) < pow($this[2], 2);
        } else {
            // we consider it is a polygon.
            // - Transform coordinates in vertices.
            // -- Use of the "point in polygon" algorithm.
            $vertices = array();
            for ($i = 0; $i < count($this); $i++) {
                $vertex = array();
                $vertex[] = $this[$i]; //x
                $i++;
                $vertex[] = $this[$i]; //y

                $vertices[] = $vertex;
            }

            $intersects = 0;
            for ($i = 1; $i < count($vertices); $i++) {
                $vertex1 = $vertices[$i -1];
                $vertex2 = $vertices[$i];

                if ($vertex1[1] === $vertex2[1] && $vertex1[1] === $point->getY() && $point->getX() > min($vertex1[0], $vertex2[0]) && $point->getX() < max($vertex1[0], $vertex2[0])) {
                    // we are on a boundary.
                    return true;
                }

                if ($point->getY() > min($vertex1[1], $vertex2[1]) && $point->getY() <= max($vertex1[1], $vertex2[1]) && $point->getX() <= max($vertex1[0], $vertex2[0]) && $vertex1[1] !== $vertex2[1]) {
                    $xinters = ($point->getY() - $vertex1[1]) * ($vertex2[0] - $vertex1[0]) / ($vertex2[1] - $vertex1[1]) + $vertex1[0];

                    if ($xinters === $point->getX()) {
                        // Again, we are on a boundary.
                        return true;
                    }

                    if ($vertex1[0] === $vertex2[0] || $point->getX() <= $xinters) {
                        // We have a single intersection.
                        $intersects++;
                    }
                }
            }

            // If we passed through an odd number of edges, we are in the polygon!
            return $intersects % 2 !== 0;
        }
    }
574072
def isInside(self, point, tol=0.0001):
        
        poly = self.polydata(True)
        points = vtk.vtkPoints()
        points.InsertNextPoint(point)
        pointsPolydata = vtk.vtkPolyData()
        pointsPolydata.SetPoints(points)
        sep = vtk.vtkSelectEnclosedPoints()
        sep.SetTolerance(tol)
        sep.CheckSurfaceOff()
        sep.SetInputData(pointsPolydata)
        sep.SetSurfaceData(poly)
        sep.Update()
        return sep.IsInside(0)
230167
function containsPoint(x, y) {
         return x >= this.left && x <= this.right && y >= this.top && y <= this.bottom;
       }
961654
def contains_point(self, pt):
    """"""
    return (self.l < pt.x and self.r > pt.x and
            self.t < pt.y and self.b > pt.y)
230215
function (point) {
        var rect = this.getRect();
        var axis = this.getAxis();
        var orient = axis.orient;
        if (orient === 'horizontal') {
            return axis.contain(axis.toLocalCoord(point[0]))
            && (point[1] >= rect.y && point[1] <= (rect.y + rect.height));
        }
        else {
            return axis.contain(axis.toLocalCoord(point[1]))
            && (point[0] >= rect.y && point[0] <= (rect.y + rect.height));
        }
    }
2544
public boolean containsPoint(INDArray point) {
        double first = point.getDouble(0), second = point.getDouble(1);
        return x - hw <= first && x + hw >= first && y - hh <= second && y + hh >= second;
    }
596346
function Point(point) {
        crs(point);
        bbox(point);
        geometrySemantics(point);
        if (!requiredProperty(point, 'coordinates', 'array')) {
            position(point.coordinates);
        }
    }