private int GetAngleToTurn(int fLeft, int iWidth, double percent) { double a = iWidth * (0.5 - percent); double h = iWidth / 2 - fLeft; double alpha = Math.Acos(a / h); int angleDegree = (int)(alpha * 360 / (2 * Math.PI)); return angleDegree; }