For the life of me, I can't get the angle between two coordinate points and the x-axis. Ultimately I am trying to dynamically connect two nodes with slightly spread out paths.
\begin{tikzpicture}
\usetikzlibrary{calc}
\tikzset{roundnode/.style={circle, draw=black, fill=white, thick, minimum size=0.1mm}}
\coordinate (X) at (8,4);
\coordinate (Y) at (8,1);
\def\r{3}
\begin{scope}
\coordinate (A) at (Y);
\coordinate (E) at (X);
\pgfmathanglebetweenpoints{A}{E}
\def\angleAE{\pgfmathresult}
\foreach \x in {-2, ..., 2}
\draw[red!50, ultra thick, dotted] (A) .. controls ($(A) + ({\r*cos(\angleAE + \x*5)}, {\r*sin(\angleAE + \x*5)})$) and ($(E) - ({\r*cos(\angleAE + \x*5)}, {-\r*sin(\angleAE + \x*5)})$) .. (V);
\draw (A) node[roundnode] (A) {\angleAE};
\draw (E) node[roundnode] (E) {\angleAE};
\end{scope}
\end{tikzpicture}
For some reason the angle always results in 0.8, regardless of the positions of the coordinates X and Y. This of course also messes up the curves
Why does it not calculate the angle between A-E and the x-axis properly?