I am trying to use simple mathematical functions such as sin, cos, and sqrt within the declaration of a TikZ coordinate. I am finding that this works for cartesian coordinates, but breaks for polar coordinates:
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
% \draw (0,0) -- (2,0) -- (45:1/0.707) -- (0,0); % <-- works
% \draw (0,0) -- (2,0) -- (45:{1/cos(45)}) -- (0,0); % <--doesn't work
\draw (0,0) -- (2,0) -- (1,{1/tan(45)}) -- (0,0); % <--works
\end{tikzpicture}
\end{document}
Is this just a known limitation, or is there some way to get around this?