<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% tkz-tools-angles.tex
% Copyright 2024  Alain Matthes
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% This work has the LPPL maintenance status â€œmaintainedâ€. 
% The Current Maintainer of this work is Alain Matthes.

\def\fileversion{5.10c}
\def\filedate{2024/04/19} 
\typeout{2024/04/19 5.10c tkz-tools-eu-angles.tex}   
\makeatletter
%&lt;--------------------------------------------------------------------------â€“&gt;
%&lt;--------------------------------------------------------------------------â€“&gt;
% thanks karu : http://tex.stackexchange.com/questions/151667/tkzgetangle-strange-behavior/196224#196224  
% \tkzGetAngle strange behavior
% defines \tkz@FirstAngle and \tkz@SecondAngle sens  trigo
%&lt;--------------------------------------------------------------------------â€“&gt;
\def\tkzNormalizeAngle(#1,#2){%
\begingroup
\pgfmathparse{#1}\xdef\tkz@FirstAngle{\pgfmathresult}%
\pgfmathparse{#2}\xdef\tkz@SecondAngle{\pgfmathresult}%
\pgfmathgreaterthan{\tkz@FirstAngle}{0}
\ifdim\pgfmathresult pt=1 pt\relax%
  \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle}
  \ifdim\pgfmathresult pt=1 pt\relax%
    \pgfmathsubtract{\tkz@FirstAngle}{360}
    \xdef\tkz@FirstAngle{\pgfmathresult}%
  \fi
\else
  \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle}
  \ifdim\pgfmathresult pt=1 pt\relax%
    \pgfmathadd{\tkz@SecondAngle}{360}
    \xdef\tkz@SecondAngle{\pgfmathresult}%
  \fi
\fi
 \endgroup
 }  
%&lt;--------------------------------------------------------------------------â€“&gt;
%                          Angle 
% Recherche l'angle formÃ© par #1 et #2 par rapport Ã&nbsp; l'horizontale
%&lt;--------------------------------------------------------------------------â€“&gt;
\def\tkzFindSlopeAngle(#1,#2){%
\begingroup
  \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{%
                             \pgfpointanchor{#2}{center}} 
  \global\let\tkzAngleResult\pgfmathresult  
\endgroup
}
%&lt;--------------------------------------------------------------------------â€“&gt;
%                          Angle  avec trois nodes
%&lt;--------------------------------------------------------------------------â€“&gt;
\def\tkzFindAngle(#1,#2,#3){% new code 2016
\begingroup
    \tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle}
    \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle}
    \tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle)
    \edef\tkz@Angle{\fpeval{\tkz@SecondAngle-\tkz@FirstAngle}}
    \global\let\tkzAngleResult\tkz@Angle
\endgroup
}

%&lt;--------------------------------------------------------------------------â€“&gt;
% Find angle
%&lt;--------------------------------------------------------------------------â€“&gt;
\def\tkzGetAngle#1{%
  \global\expandafter\edef\csname #1\endcsname{\tkzAngleResult}
}  
\def\tkzDet(#1,#2,#3){%
\tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle}
\tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle}
\tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle)
}
\makeatother
\endinput</pre></body></html>