public void bounceX(Paddle p)
	{
		double angle = getAngle();
		double mag = getMagnitude();
		if (p.y + p.height / 2 > y + r)
		{
			if (yVel > 0)
			{
				if (angle > PI / 2)
				{
					double diff = PI - angle;
					double percent = (double) (p.y + p.height / 2 - y - r) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = PI - diff;
					setAngle(newAngle);
				}
				else if (angle < PI / 2)
				{
					double diff = angle;
					double percent = (double) (p.y + p.height / 2 - y - r) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = diff;
					setAngle(newAngle);
				}
			}
			else if (yVel < 0)
			{
				if (angle < PI * 3 / 2 )
				{
					double diff = 3 * PI / 2 - angle;
					double percent = (double) (p.y + p.height / 2 - y - r) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = 3 * PI / 2 - diff;
					setAngle(newAngle);
				}
				else if (angle > PI * 3 / 2)
				{
					double diff = angle - 3 * PI / 2;
					double percent = (double) (p.y + p.height / 2 - y - r) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = diff + 3 * PI / 2;
					setAngle(newAngle);
				}
			}
		}
		else if (p.y + p.height / 2 < y + r)
		{
			if (yVel > 0)
			{
				if (angle > PI / 2)
				{
					double diff = angle - PI / 2;
					double percent = (double) (y + r - p.y - p.height / 2) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = PI / 2 + diff;
					setAngle(newAngle);
				}
				else if (angle < PI / 2)
				{
					double diff = PI / 2 - angle;
					double percent = (double) (y + r - p.y - p.height / 2) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = PI / 2 - diff;
					setAngle(newAngle);
				}
			}
			else if (yVel < 0)
			{
				if (angle < PI * 3 / 2)
				{
					double diff = angle - PI;
					double percent = (double) (y + r - p.y - p.height / 2) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = PI + diff;
					setAngle(newAngle);
				}
				else if (angle > PI * 3 / 2)
				{
					double diff = 2 * PI - angle;
					double percent = (double) (y + r - p.y - p.height / 2) / (p.height / 2);
					percent *= 0.25;
					diff *= 1 - percent;
					double newAngle = 2 * PI - diff;
					setAngle(newAngle);
				}
			}
		}
		xVel *= -1;
		setMagnitude(mag * 1);
	}