Creates a triangle shape with the given coordinates

@param w The width
@param y0 The first y-coordinate
@param y1 The second y-coordinate
@return The shape
545297
private static Shape createArrowShape(int w, int y0, int y1)
    {
        Path2D path = new Path2D.Double();
        path.moveTo(0, y0);
        if ((w & 1) == 0)
        {
            path.lineTo(w>>1, y1);
        }
        else
        {
            int c = w>>1;
            path.lineTo(c, y1);
            path.lineTo(c+1, y1);
        }
        path.lineTo(w, y0);
        path.closePath();
        return path;
    }
1052313
public void setY(float y) {
    	if (y != this.y) {
    		float dy = y - this.y;
	        this.y = y;

	        if ((points == null) || (center == null)) {
	        	checkPoints();
	        }
	        // update the points in the special case
    		for (int i=0;i<points.length/2;i++) {
    			points[(i*2)+1] += dy;
    		}
    		center[1] += dy;
    		y += dy;
    		maxY += dy;
    		minY += dy;
	        trianglesDirty = true;
    	}
    }
425964
def make_grid(xx, yy):
    
    n = len(xx)
    xx, yy = np.meshgrid(xx, yy)
    grid = np.array([xx.ravel(), yy.ravel()]).T
    x = grid[:, 0].reshape(n, n)
    y = grid[:, 1].reshape(n, n)
    return x, y
268846
public Triangle setPoints(final Point2D a, final Point2D b, final Point2D c)
    {
        return setPoint2DArray(new Point2DArray(a, b, c));
    }
135098
@Pure
	public static Point2d L1_L4(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_1_N,
				LAMBERT_1_C,
				LAMBERT_1_XS,
				LAMBERT_1_YS);
		return NTFLambdaPhi_NTFLambert(
				ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
				LAMBERT_4_N,
				LAMBERT_4_C,
				LAMBERT_4_XS,
				LAMBERT_4_YS);
	}
214845
public void rectangle(float x, float y, float w, float h) {
        content.append(x).append(' ').append(y).append(' ').append(w).append(' ').append(h).append(" re").append_i(separator);
    }
612290
private void createShape() {
    if (shape == null) {
      float firstItemMargin = noxConfig.getNoxItemMargin();
      float firstItemSize = noxConfig.getNoxItemSize();
      int viewHeight = getMeasuredHeight();
      int viewWidth = getMeasuredWidth();
      int numberOfElements = noxItemCatalog.size();
      ShapeConfig shapeConfig =
          new ShapeConfig(numberOfElements, viewWidth, viewHeight, firstItemSize, firstItemMargin);
      shape = ShapeFactory.getShapeByKey(defaultShapeKey, shapeConfig);
    } else {
      shape.setNumberOfElements(noxItemCatalog.size());
    }
    shape.calculate();
  }
57857
public Vector4d set(Vector2fc v, double z, double w) {
        return set(v.x(), v.y(), z, w);
    }
796075
def block_cat(self, Y0, Y1):
        

        # Axes are swapped here for similar reasons to those
        # motivating swapping in cbpdn.ConvTwoBlockCnstrnt.block_cat
        Y1sa = np.swapaxes(Y1, self.cri.axisM, -1)[..., 0]

        # If cri.Cd > 1 (multi-channel dictionary) Y0 has a singleton
        # channel axis but Y1 has a non-singleton channel axis. To make
        # it possible to concatenate Y0 and Y1, we reshape Y1 by a
        # partial ravel of axisM and axisC onto axisM.
        if self.cri.Cd > 1:
            shp = list(Y1sa.shape)
            shp[self.cri.axisM] *= shp[self.cri.axisC]
            shp[self.cri.axisC] = 1
            Y1sa = Y1sa.reshape(shp)

        return np.concatenate((Y0, Y1sa), axis=self.cri.axisM)
706267
def _create_Z(self,Y):
        

        Z = np.ones(((self.ylen*self.lags +1),Y[0].shape[0]))
        return self.create_design_matrix(Z, self.data, Y.shape[0], self.lags)
312081
public static Geometry createShape(String name, Mesh shape, ColorRGBA color) {
        checkInit();
        
        Geometry g = new Geometry(name, shape);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.getAdditionalRenderState().setWireframe(true);
        mat.setColor("Color", color);
        g.setMaterial(mat);
        return g;
    }
496065
public CellStyle getOrCreateRowStyle(int y) {
		final Row row = getOrCreateRow(y);
		CellStyle rowStyle = row.getRowStyle();
		if (null == rowStyle) {
			rowStyle = this.workbook.createCellStyle();
			row.setRowStyle(rowStyle);
		}
		return rowStyle;
	}
1109881
public Vector4d set(Vector3dc v, double w) {
        return set(v.x(), v.y(), v.z(), w);
    }
846747
def random_point_triangle(triangle, use_int_coords=True):
        
        xs, ys = triangle.exterior.coords.xy
        A, B, C = zip(xs[:-1], ys[:-1])
        r1, r2 = np.random.rand(), np.random.rand()
        rx, ry = (1 - sqrt(r1)) * np.asarray(A) + sqrt(r1) * (1 - r2) * np.asarray(B) + sqrt(r1) * r2 * np.asarray(C)
        if use_int_coords:
            rx, ry = round(rx), round(ry)
            return Point(int(rx), int(ry))
        return Point(rx, ry)
1293313
public static Point createPoint(double x, double y) throws SQLException {
        return createPoint(x, y, Coordinate.NULL_ORDINATE);
    }
740807
public float distance(float x, float y, float z, float w) {
        return (float) Math.sqrt(distanceSquared(x, y, z, w));
    }
1324274
public int getWidth(int y)
    {
        int maxx = 0;
        for (int i = 0; i < size(); i++)
        {
            Box box = getBox(i);
            if (box.getBounds().y <= y &&
                box.getBounds().y + box.getBounds().height > y)
            {
                int wx = box.getBounds().x + box.getBounds().width;
                if (wx > maxx) maxx = wx;
            }
        }
        return maxx;
    }