with the interior of Point B.
170900
private void interiorAreaInteriorPoint_(int cluster, int id_a) {
		if (m_matrix[MatrixPredicate.InteriorInterior] == 0)
			return;

		int clusterParentage = m_topo_graph.getClusterParentage(cluster);

		if ((clusterParentage & id_a) == 0) {
			int chain = m_topo_graph.getClusterChain(cluster);
			int chainParentage = m_topo_graph.getChainParentage(chain);

			if ((chainParentage & id_a) != 0) {
				m_matrix[MatrixPredicate.InteriorInterior] = 0;
			}
		}
	}
1389
function pointAt(node){
      var parent = node.parentNode;
      var next = node.nextSibling;
      return function(newnode) {
        parent.insertBefore(newnode, next);
      };
    }
1340591
private void interiorAreaBoundaryArea_(int half_edge, int id_a,
			int predicate) {
		if (m_matrix[predicate] == 1)
			return;

		int faceParentage = m_topo_graph.getHalfEdgeFaceParentage(half_edge);
		int twinFaceParentage = m_topo_graph
				.getHalfEdgeFaceParentage(m_topo_graph
						.getHalfEdgeTwin(half_edge));

		if ((faceParentage & id_a) != 0 && (twinFaceParentage & id_a) != 0)
			m_matrix[predicate] = 1;
	}
695171
static boolean pointInPolygon(float[] pt, float[] verts, int nverts) {
        // TODO: Replace pnpoly with triArea2D tests?
        int i, j;
        boolean c = false;
        for (i = 0, j = nverts - 1; i < nverts; j = i++) {
            int vi = i * 3;
            int vj = j * 3;
            if (((verts[vi + 2] > pt[2]) != (verts[vj + 2] > pt[2])) && (pt[0] < (verts[vj + 0] - verts[vi + 0])
                    * (pt[2] - verts[vi + 2]) / (verts[vj + 2] - verts[vi + 2]) + verts[vi + 0])) {
                c = !c;
            }
        }
        return c;
    }
365646
function( pointA, pointB ) {

	        return { x: pointB.x - pointA.x, y: -( pointB.y - pointA.y ) };
	    }
119771
def _inner(self, x, y):
        """"""
        if self.is_uniform and not self.is_uniformly_weighted:
            # TODO: implement without copying x
            bdry_fracs = self.partition.boundary_cell_fractions
            func_list = _scaling_func_list(bdry_fracs, exponent=1.0)
            x_arr = apply_on_boundary(x, func=func_list, only_once=False)
            return super(DiscreteLp, self)._inner(self.element(x_arr), y)
        else:
            return super(DiscreteLp, self)._inner(x, y)
617367
function middleInside (data, start, a, b) {
  var node = start,
    inside = false,
    px = (data[a] + data[b]) / 2,
    py = (data[a + 1] + data[b + 1]) / 2
  do {
    var p1 = node.i,
      p2 = node.next.i

    if (((data[p1 + 1] > py) !== (data[p2 + 1] > py)) &&
      (px < (data[p2] - data[p1]) * (py - data[p1 + 1]) / (data[p2 + 1] - data[p1 + 1]) + data[p1])) {
      inside = !inside
    }

    node = node.next
  } while (node !== start)

  return inside
}
272222
function bisect(f, a, b, parameters) {
        parameters = parameters || {};
        var maxIterations = parameters.maxIterations || 100,
            tolerance = parameters.tolerance || 1e-10,
            fA = f(a),
            fB = f(b),
            delta = b - a;

        if (fA * fB > 0) {
            throw "Initial bisect points must have opposite signs";
        }

        if (fA === 0) return a;
        if (fB === 0) return b;

        for (var i = 0; i < maxIterations; ++i) {
            delta /= 2;
            var mid = a + delta,
                fMid = f(mid);

            if (fMid * fA >= 0) {
                a = mid;
            }

            if ((Math.abs(delta) < tolerance) || (fMid === 0)) {
                return mid;
            }
        }
        return a + delta;
    }
1244216
private static Point getLinesIntersection(Line2D a,
                                              Line2D b) {
        double d = (a.getX1() - a.getX2()) * (b.getY2() - b.getY1()) - (a.getY1() - a.getY2()) * (b.getX2() - b.getX1());
        double da = (a.getX1() - b.getX1()) * (b.getY2() - b.getY1()) - (a.getY1() - b.getY1()) * (b.getX2() - b.getX1());
        double ta = da / d;
        Point p = new Point();
        p.setLocation(a.getX1() + ta * (a.getX2() - a.getX1()),
                      a.getY1() + ta * (a.getY2() - a.getY1()));
        return p;
    }
59265
def is_inside(point, region):
    
    points = region.vertices
    extrame = models.Point(x=1000000, y=point.y)

    points = points + [points[0]]
    intersect_count = 0
    for i in range(len(points) - 1):
        if is_intersect(models.Line(point, extrame),
                        models.Line(points[i], points[i+1])):
            intersect_count += 1
    return intersect_count % 2 == 1
567030
def b(self):
        '''
        

        '''
        b = Point(self.center)

        if self.xAxisIsMinor:
            b.x += self.minorRadius
        else:
            b.y += self.minorRadius
        return b
522477
private boolean equalShapes(Shape a, Shape b) {
		a.checkPoints();
		b.checkPoints();
		
		for (int i=0;i<a.points.length;i++) {
			if (a.points[i] != b.points[i]) {
				return false;
			}
		}
		
		return true;
	}
87523
static boolean pointDisjointEnvelope_(Point2D pt_a, Envelope2D env_b,
			double tolerance, ProgressTracker progress_tracker) {
		Envelope2D env_b_inflated = new Envelope2D();
		env_b_inflated.setCoords(env_b);
		env_b_inflated.inflate(tolerance, tolerance);
		return !env_b_inflated.contains(pt_a);
	}
726682
private void boundaryAreaExteriorArea_(int half_edge, int id_a, int id_b,
			int predicate) {
		if (m_matrix[predicate] == 1)
			return;

		int faceParentage = m_topo_graph.getHalfEdgeFaceParentage(half_edge);
		int twinFaceParentage = m_topo_graph
				.getHalfEdgeFaceParentage(m_topo_graph
						.getHalfEdgeTwin(half_edge));

		if ((faceParentage & id_b) == 0 && (twinFaceParentage & id_b) == 0)
			m_matrix[predicate] = 1;
	}
893960
def get_b(self):
        """"""

        start_point, end_point = self._get_bottom_line_coordinates()
        width = self._get_bottom_line_width()
        color = self._get_bottom_line_color()

        return CellBorder(start_point, end_point, width, color)
488034
function insidePoint(element, x, y) {
        let offset = element.offset();
        if (x < offset.left || offset.left + element.outerWidth(true) < x)
          return false;
        if (y < offset.top || offset.top + element.outerHeight(true) < y)
          return false;
        return true;
      }
1180837
function insideElement(from, to, fromBBox, toBBox, bearing) {

        var route = {};
        var boundary = fromBBox.union(toBBox).inflate(1);

        // start from the point which is closer to the boundary
        var reversed = boundary.center().distance(to) > boundary.center().distance(from);
        var start = reversed ? to : from;
        var end = reversed ? from : to;

        var p1, p2, p3;

        if (bearing) {
            // Points on circle with radius equals 'W + H` are always outside the rectangle
            // with width W and height H if the center of that circle is the center of that rectangle.
            p1 = g.Point.fromPolar(boundary.width + boundary.height, radians[bearing], start);
            p1 = boundary.pointNearestToPoint(p1).move(p1, -1);

        } else {
            p1 = boundary.pointNearestToPoint(start).move(start, 1);
        }

        p2 = freeJoin(p1, end, boundary);

        if (p1.round().equals(p2.round())) {
            p2 = g.Point.fromPolar(boundary.width + boundary.height, g.toRad(p1.theta(start)) + Math.PI / 2, end);
            p2 = boundary.pointNearestToPoint(p2).move(end, 1).round();
            p3 = freeJoin(p1, p2, boundary);
            route.points = reversed ? [p2, p3, p1] : [p1, p3, p2];

        } else {
            route.points = reversed ? [p2, p1] : [p1, p2];
        }

        route.direction = reversed ? getBearing(p1, to) : getBearing(p2, to);

        return route;
    }