All the calculations work very accurately. I.e. when they are used to calculate the orientation of a cylinder, the start and end of the cylinder fall exactly on the source and target.
You'll notice though that toElevationRadiansNumerical() is not very elegant. It tries different elevation angles until it finds one that produces the expected target.
Is there a better (more concise) way to calculate the elevation angle yet still produce good results?