I want to draw several different triangles ABC with the angles marked and the angle value written in it. Thanks to answers on on another question, I've managed to get this code:
\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all} %% om allerhande objecten te gebruiken zoals gradenboog...
\usetikzlibrary{calc,intersections,through,backgrounds,snakes}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepgfplotslibrary{statistics}
\begin{document}
\makeatletter
\newcommand\ddToddmmss[1]{%
\pgfmathtruncatemacro\deg@tmp{#1}%
\pgfmathsetmacro\min@tmp{(#1-\deg@tmp)*60}%
\pgfmathtruncatemacro\Min@tmp{\min@tmp}
\pgfmathtruncatemacro\sec@tmp{(\min@tmp-floor(\min@tmp))*60}%
\ensuremath{\deg@tmp^\circ \Min@tmp ' \sec@tmp ''}}
\makeatother
\begin{tikzpicture}
\tkzInit[ymin=0,ymax=9,xmin=0,xmax=15]
\tkzClip
\tkzGrid
\tkzDefPoints{1/3/A, 7/8/B, 12/1/C}
\tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) \tkzLabelPoints(A,B,C)
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](C,A,B);
\tkzFindAngle(C,A,B) \tkzGetAngle{angleCAB};
%\FPround\angleBAC\angleCAB{2}
\tkzLabelAngle[pos = 2.3](C,A,B){\ddToddmmss{\angleCAB}};
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,B,C);
\tkzFindAngle(A,B,C) \tkzGetAngle{angleABC};
%\FPround\angleABC\angleABC{2}
\tkzLabelAngle[pos = 2.3](A,B,C){\ddToddmmss{\angleABC}};
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](B,C,A);
\tkzFindAngle(B,C,A) \tkzGetAngle{angleBCA};
%\FPround\angleBCA\angleBCA{2}
\tkzLabelAngle[pos = 2.3](B,C,A){\ddToddmmss{\angleBCA}};
\end{tikzpicture}
\begin{tikzpicture}
\tkzInit[ymin=0,ymax=9,xmin=0,xmax=15]
\tkzClip
\tkzGrid
\tkzDefPoints{1/3/A, 7/8/B, 12/5/C}
\tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) \tkzLabelPoints(A,B,C)
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](C,A,B);
\tkzFindAngle(C,A,B) \tkzGetAngle{angleCAB};
%\FPround\angleBAC\angleCAB{2}
\tkzLabelAngle[pos = 2.3](C,A,B){\ddToddmmss{\angleCAB}};
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,B,C);
\tkzFindAngle(A,B,C) \tkzGetAngle{angleABC};
%\FPround\angleABC\angleABC{2}
\tkzLabelAngle[pos = 2.3](A,B,C){\ddToddmmss{\angleABC}};
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](B,C,A);
\tkzFindAngle(B,C,A) \tkzGetAngle{angleBCA};
%\FPround\angleBCA\angleBCA{2}
\tkzLabelAngle[pos = 2.3](B,C,A){\ddToddmmss{\angleBCA}};
\end{tikzpicture}
\end{document}
Problem is, in version 2, where point C is higher than point A, he takes the wrong angle.
Any suggestions?