docs: public void randomize() {
  		numKnots = 4 + (int)(6*Math.random());
  		xKnots = new int[numKnots];
  		yKnots = new int[numKnots];
  		knotTypes = new byte[numKnots];
  		for (int i = 0; i < numKnots; i++) {
  			xKnots[i] = (int)(255 * Math.random());
  			yKnots[i] = 0xff000000 | ((int)(255 * Math.random()) << 16) | ((int)(255 * Math.random()) << 8) | (int)(255 * Math.random());
  			knotTypes[i] = RGB|SPLINE;
  		}
  		xKnots[0] = -1;
  		xKnots[1] = 0;
  		xKnots[numKnots-2] = 255;
  		xKnots[numKnots-1] = 256;
  		sortKnots();
  		rebuildGradient();
  	}