public void addPointInOrder(Point2D newPoint) {
		if (pointList.size()>0 && newPoint.getX() < getMaxX())
			throw new IllegalArgumentException("Non-increasing x value");
		prevYSum = ySum;
		if (Double.isNaN(maxY) || newPoint.getY() > maxY)
			maxY = newPoint.getY();

		if (Double.isNaN(minY) || newPoint.getY() < minY)
			minY = newPoint.getY();

		//System.out.println("Adding point " + newPoint.getY() + " to series");
		double y = newPoint.getY();
		ySum += y;
		if (pointList.size()>1)
			m2n += (y-ySum/(pointList.size()+1.0))*(y-prevYSum/(pointList.size()));
		pointList.add(newPoint);
	}