Add a coordinate pair, performing curve simplification if possible.

@param x X coordinate
@param y Y coordinate
8657
public void addAndSimplify(double x, double y) {
    // simplify curve when possible:
    final int len = data.size();
    if (len >= 4) {
      // Look at the previous 2 points
      final double l1x = data.get(len - 4);
      final double l1y = data.get(len - 3);
      final double l2x = data.get(len - 2);
      final double l2y = data.get(len - 1);
      // Differences:
      final double ldx = l2x - l1x;
      final double ldy = l2y - l1y;
      final double cdx = x - l2x;
      final double cdy = y - l2y;
      // X simplification
      if ((ldx == 0) && (cdx == 0)) {
        data.remove(len - 2, 2);
      }
      // horizontal simplification
      else if ((ldy == 0) && (cdy == 0)) {
        data.remove(len - 2, 2);
      }
      // diagonal simplification
      else if (ldy > 0 && cdy > 0) {
        if (Math.abs((ldx / ldy) - (cdx / cdy)) < THRESHOLD) {
          data.remove(len - 2, 2);
        }
      }
    }
    add(x, y);
  }
1347676
private static final void add(long10 xy, long10 x, long10 y) {
		xy._0 = x._0 + y._0;	xy._1 = x._1 + y._1;
		xy._2 = x._2 + y._2;	xy._3 = x._3 + y._3;
		xy._4 = x._4 + y._4;	xy._5 = x._5 + y._5;
		xy._6 = x._6 + y._6;	xy._7 = x._7 + y._7;
		xy._8 = x._8 + y._8;	xy._9 = x._9 + y._9;
	}
1346047
public void set(double x, double y, double z) {
        this.MODE = POINTS_3D;
        this.x = x;
        this.y = y;
        this.z = z;
    }
783639
@Override
    public T setOffset(final double x, final double y)
    {
        getAttributes().setOffset(x, y);

        return cast();
    }
964353
public void setPosition(double x, double y, double z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}
1358952
static public double xy(double[] x, double[] y) {
    double result = 0.0;
    for (int i = 0; i < x.length; i++) {
      result += (x[i] * y[i]);
    }

    return (result);
  }
592911
public void moveTo(double x, double y, double z) {
		if (this.numTypesProperty.get()>0 && this.types[this.numTypesProperty.get()-1]==PathElementType.MOVE_TO) {
			this.coordsProperty[this.numCoordsProperty.get()-3].set(x);
			this.coordsProperty[this.numCoordsProperty.get()-2].set(y);
			this.coordsProperty[this.numCoordsProperty.get()-1].set(z);
		}
		else {
			ensureSlots(false, 3);
			this.types[this.numTypesProperty.get()] = PathElementType.MOVE_TO;
			this.numTypesProperty.set(this.numTypesProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(x);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(y);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);

			this.coordsProperty[this.numCoordsProperty.get()].set(z);
			this.numCoordsProperty.set(this.numCoordsProperty.get()+1);
		}
		this.graphicalBounds = null;
		this.logicalBounds = null;
	}
972037
public void addCoordinate(Coordinate coordinate) {
		Coordinate[] newCoords = new Coordinate[coordinates.length + 1];
		System.arraycopy(coordinates, 0, newCoords, 0, coordinates.length);
		newCoords[coordinates.length] = coordinate;
		setCoordinates(newCoords);
	}
1090450
private static final void x_to_y2(long10 t, long10 y2, long10 x) {
		sqr(t, x);
		mul_small(y2, x, 486662);
		add(t, t, y2);
		t._0++;
		mul(y2, t, x);
	}
92678
public void set(double x1, double y1, double x2, double y2)
    {
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
    }
488263
public void setLocation(double x, double y)
    {
        final double dx = x - (mover.getX() + offset.getX());
        final double dy = y - (mover.getY() + offset.getY());
        moveLocation(1, dx, dy);
    }
1306634
public Member add(Number x, Number y) {
		return add(new Point(x, y));
	}
430401
public void lineTo(float x, float y) {
		if (hole != null) {
			hole.add(new float[] {x,y});
		} else {
			localPoints.add(new float[] {x,y});
		}
		cx = x;
		cy = y;
		pointsDirty = true;
	}
793147
public void setVertex(int i, double x, double y) {
        this.x.set(i, x);
        this.y.set(i, y);
        this.z.set(i, 0d);
        calcG();
    }
692224
public void addPoint(float x, float y) {
    	if (hasVertex(x,y) && (!allowDups)) {
    		return;
    	}
    	
        ArrayList tempPoints = new ArrayList();
        for(int i=0;i<points.length;i++) {
            tempPoints.add(new Float(points[i]));
        }
        tempPoints.add(new Float(x));
        tempPoints.add(new Float(y));
        int length = tempPoints.size();
        points = new float[length];
        for(int i=0;i<length;i++) {
            points[i] = ((Float)tempPoints.get(i)).floatValue();
        }
        if(x > maxX) {
            maxX = x;
        }
        if(y > maxY) {
            maxY = y;
        }
        if(x < minX) {
            minX = x;
        }
        if(y < minY) {
            minY = y;
        }
        findCenter();
        calculateRadius();
        
        pointsDirty = true;
    }
552596
def addPoint( self, x, y ):
        
        self._points.append((x, y))
        self._dirty = True
1019913
@ExportConstructor
	public static org.geomajas.geometry.Coordinate constructor(double x, double y) {
		return new org.geomajas.geometry.Coordinate(x, y);
	}