private void checkForPeakX(double x) {
		if (isUpPeakX) {
			if (x < lastX) {
				peakX = lastX;
				isUpPeakX = false;
			}
		} else {
			if (x > lastX) {
				peakX = lastX;
				isUpPeakX = true;
			}
		}

		lastX = x;
	}