The question comes from this question : here
\documentclass{standalone}
\usepackage{tkz-euclide,xfp}
\usetkzobj{all} % with version 1.16 not necessary with 2.5xx (soon)
\input{mynewmacro}
\begin{document}
\begin{tikzpicture}
\def\angle{5}
\def\r{8cm}
\coordinate (O) at (0,0);
\coordinate (A) at (\angle:\r);
\coordinate (B) at (0:\r);
\foreach \x/\y in {O/A,O/B} {\draw (\x) -- (\y);}
\tkzMarkAngles(B,O,A)
\end{tikzpicture}
%\begin{tikzpicture}
% How to use the original function veclen here ?
%\end{tikzpicture}
\end{document}
with the file mynewmacro.tex
\makeatletter
\pgfmathdeclarefunction*{veclen}{2}{%
\begingroup%
\pgfmath@x#1pt\relax%
\pgfmath@y#2pt\relax%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\edef\tkz@temp@a{\fpeval{\pgfmath@tonumber{\pgf@xa}}}
\edef\tkz@temp@b{\fpeval{\pgfmath@tonumber{\pgf@ya}}}
\edef\tkz@temp@sum{\fpeval{%
(\tkz@temp@a*\tkz@temp@a+\tkz@temp@b*\tkz@temp@b)}}
\edef\tkz@xfpMathLen{\fpeval{sqrt(\tkz@temp@sum)}}
\pgfmath@returnone\tkz@xfpMathLen pt%
\endgroup%
}
\makeatother
\endinput
How to use the original function veclen in the second picture ?

tikzpicturethat load all thekz-euclidestuff? – Jan 03 '20 at 14:33veclen– Alain Matthes Jan 03 '20 at 14:39tkz-euclide– Alain Matthes Jan 03 '20 at 14:45\tkzMarkAngles? – egreg Jan 03 '20 at 14:59\usetkzobj{all}– Alain Matthes Jan 03 '20 at 15:07\edef\tkz@xfpMathLen{\fpeval{sqrt(\pgf@x^2+\pgf@y^2)}}? By the way, in the code for the function, you have%where they aren't needed and miss them where they are needed. – egreg Jan 03 '20 at 15:07\edef\tkz@xfpMathLen{\fpeval{sqrt((#1)^2+(#2)^2)}}suffices. – egreg Jan 03 '20 at 15:12fp. – Alain Matthes Jan 03 '20 at 15:13\pgfmathbecause I need to use the parser (p1032 of the pgf manual). 2) I avoided^for obscure reasons 3) and finally I think the syntax offpwas not very happy.xfpis progress !! – Alain Matthes Jan 03 '20 at 15:35