distanceAtBestAngle in C with floats