private static double distance(double referencePoint, double xVelocity, double centerX, double radius) {
	//	System.out.println("Calling distance with reference point " + referencePoint);
		double paddleGap = Constants.stageWidth * .6;
	//	System.out.println("Paddle Gap is " + paddleGap);
		if (xVelocity > 0 && referencePoint > centerX) {
			return referencePoint - centerX - radius;
		} else if (xVelocity < 0 && referencePoint < centerX) {
			return centerX - referencePoint - radius;
		} else if (xVelocity < 0) {
		//	System.out.println("Found a ball that meets certain conditions");
			return paddleGap - (referencePoint - centerX - radius) + paddleGap;
		} else {
		//	System.out.println("Elsewhere condition");
			return paddleGap - (centerX - referencePoint - radius) + paddleGap;
		}
	}