function FSmoothInterpolation (x) {
	return (x) * (x) * (3 - 2 * (x));
}

function FGetGapLength (xA, yA, xB, yB) {
	return((xB - xA)^2 + (yB - yA)^2)^0.5;
}

function FGetGapAngle (xA, yA, xB, yB) {
	return atan2(yB - yA, xB - xA);
}

function FReflectionAngle (angle, mirror) {
	return 2 * mirror - angle;
}