Compares two vertices lexicographically by y.
480352
public int compare(Point2D other) {
		return y < other.y ? -1 : (y > other.y ? 1 : (x < other.x ? -1
				: (x > other.x ? 1 : 0)));
	}
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;
	}
810475
def between(y, z):
        """"""
        return _combinable(lambda x: (y <= x < z) or _equal_or_float_equal(x, y))
486555
def window_xy x,y
      s = ""
      s << "+" if x > 0
      s << x.to_s
      s << "+" if y > 0
      s << y.to_s
      @root.geometry s
    end
156258
function verticesProjection(vertices, axis) {
      const [p1, p2, p3, p4] = vertices.map(v => axis.dot(new Vector(v)));

      return [Math.min(p1, p2, p3, p4), Math.max(p1, p2, p3, p4)];
    }
1283023
def do_bb_intersect(a, b):
    """"""
    return a.p1.x <= b.p2.x \
        and a.p2.x >= b.p1.x \
        and a.p1.y <= b.p2.y \
        and a.p2.y >= b.p1.y
175502
def _intersect(self, label, xmin, ymin, xmax, ymax):
        """"""
        left = np.maximum(label[:, 0], xmin)
        right = np.minimum(label[:, 2], xmax)
        top = np.maximum(label[:, 1], ymin)
        bot = np.minimum(label[:, 3], ymax)
        invalid = np.where(np.logical_or(left >= right, top >= bot))[0]
        out = label.copy()
        out[:, 0] = left
        out[:, 1] = top
        out[:, 2] = right
        out[:, 3] = bot
        out[invalid, :] = 0
        return out
1258468
public static int findEdge(Poly node, Poly neighbour, MeshData tile, MeshData neighbourTile) {
		// Compare indices first assuming there are no duplicate vertices
		for (int i = 0; i < node.vertCount; i++) {
			int j = (i + 1) % node.vertCount;
			for (int k = 0; k < neighbour.vertCount; k++) {
				int l = (k + 1) % neighbour.vertCount;
				if ((node.verts[i] == neighbour.verts[l] && node.verts[j] == neighbour.verts[k])
						|| (node.verts[i] == neighbour.verts[k] && node.verts[j] == neighbour.verts[l])) {
					return i;
				}
			}
		}
		// Fall back to comparing actual positions in case of duplicate vertices
		for (int i = 0; i < node.vertCount; i++) {
			int j = (i + 1) % node.vertCount;
			for (int k = 0; k < neighbour.vertCount; k++) {
				int l = (k + 1) % neighbour.vertCount;
				if ((samePosition(tile.verts, node.verts[i], neighbourTile.verts, neighbour.verts[l])
						&& samePosition(tile.verts, node.verts[j], neighbourTile.verts, neighbour.verts[k]))
						|| (samePosition(tile.verts, node.verts[i], neighbourTile.verts, neighbour.verts[k])
								&& samePosition(tile.verts, node.verts[j], neighbourTile.verts, neighbour.verts[l]))) {
					return i;
				}
			}
		}
		return -1;
	}
105598
def vertices(self):
        '''
        
        '''
        return {'a': self.a, 'a_neg': self.a_neg,
                'b': self.b, 'b_neg': self.b_neg}
680894
def dot(vec1, vec2):
        """"""
        if isinstance(vec1, Vector2) \
                and isinstance(vec2, Vector2):
            return ((vec1.X * vec2.X) + (vec1.Y * vec2.Y))
        else:
            raise TypeError("vec1 and vec2 must be Vector2's")
684199
def compare(self, v1, v2):
        
        try:
            if len(v1) != len(v2): return 0
            for x, y in zip(v1, v2):
                if abs( x - y ) > self.tolerance:
                    return 0
            return 1
        except:
            # some patterns may not be vectors
            try:
                if abs( v1 - v2 ) > self.tolerance:
                    return 0
                else:
                    return 1
            except:
                return 0
647256
def between_or_equal_to(y, z):
        """"""
        return _combinable(lambda x: (y <= x <= z) or _equal_or_float_equal(x, y) or _equal_or_float_equal(x, z))
966473
int compareX(Point2D other) {
		return x < other.x ? -1 : (x > other.x ? 1 : (y < other.y ? -1
				: (y > other.y ? 1 : 0)));
	}
1328981
def is_bbox_not_intersecting(self, other):
        """"""

        self_x_min, self_x_max, self_y_min, self_y_max = self.get_bbox()
        other_x_min, other_x_max, other_y_min, other_y_max = other.get_bbox()

        return \
            self_x_min > other_x_max or \
            other_x_min > self_x_max or \
            self_y_min > other_y_max or \
            other_y_min > self_y_max
1122574
public static int compareUnsigned(int x, int y) {
    return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE);
  }
842472
public static int compare(Point offset, BlockPos pos1, BlockPos pos2)
	{
		if (pos1.equals(pos2))
			return 0;

		return Double.compare(pos1.distanceSq(offset.x, offset.y, offset.z), pos2.distanceSq(offset.x, offset.y, offset.z));
	}
656195
def prox_yline(y, step):
    """"""
    if not np.isscalar(y):
        y= y[0]
    if y > -0.75:
        return np.array([-0.75])
    else:
        return np.array([y])