\catcode`@=11%
%
\def\VDDtriangleonesidesameangle@#1:#2&#3:#4,#5 {%
  {%
    \VDDcopy@ ti&tii&A&B&:#2&#3&ti&tii&
    \edef\VDD@ti{#4}\edef\VDD@tii{#5}%
    \let\newlength\VDD@ti\let\newangle\VDD@tii
    \VDDcpanglehatx@\angle:#3&#2
    \VDDaddangle@@{\angle}{\angle}{\newangle}%
    \VDDcdirvecangle@ C:\angle:
    \VDDclincomb@ C:1*A+\newlength*C
    \VDDgcopy@ ti&:C&
  }%
  \VDDcopy@ #1&:ti&
}%
\def\VDDtriangleonesideotherangle@#1:#2&#3:#4,#5 {%
  {%
    \VDDcopy@ ti&tii&A&B&:#2&#3&ti&tii&
    \edef\VDD@ti{#4}\edef\VDD@tii{#5}%
    \let\newlength\VDD@ti\let\newangle\VDD@tii
    \VDDcsub@ dirc:B&A&
    \VDDcinnerproduct@\ip:dirc&dirc
    \FPupn\sqc{\ip{} \newlength{} \newlength{} mul sub}%
    \FPupn\sqb{-2 .5 \ip{} pow \newangle{} 180 div FPpi mul cos mul mul}%
    \FPqsolve\tmpi\tmpii{1}\sqb\sqc
    \VDDtriangleonesidesameangle@ C:A&B:\tmpi,\newangle{}
    \VDDgcopy@ ti&:C&
  }%
  \VDDcopy@ #1&:ti&
}%
\def\VDDtriangletwoangles@#1:#2&#3:#4,#5 {%
  {%
    \edef\VDD@tmpi{#4}\edef\VDD@tmpii{#5}%
    \let\degA\VDD@tmpi\let\degB\VDD@tmpii
    \VDDcpanglehatx@\angleAB:#2&#3
    \VDDaddangle@@\angleAC\angleAB\degA
    \VDDaddangle@@\angleAB\angleAB{180}%
    \VDDsubangle@@\angleBC\angleAB\degB
    \VDDdeflineangle@ l:#2:\angleAC:
    \VDDdeflineangle@ m:#3:\angleBC:
    \VDDcintersect@ C:l&m:
    \VDDcopy@ ti&:C&
  }%
  \VDDcopy@#1&:ti&
}%
\def\VDDtriangletwoangles#1:#2:#3 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@not\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDtriangletwoangles@\VDDparse@tmp:#3
}%
%
\def\VDDtriangleonesidesameangle#1:#2:#3 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@not\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDtriangleonesidesameangle@\VDDparse@tmp:#3
}%
%
\def\VDDtriangleonesideotherangle#1:#2:#3 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@not\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDtriangleonesideotherangle@\VDDparse@tmp:#3
}%
%
\def\VDDtrianglegelijkvormig@#1:#2&#3:#4&#5&#6& {%
  {%
    \VDDcanglebetween@\degA:#6&#4&#5
    \VDDcanglebetween@\degB:#4&#5&#6
    \FPabs{\degA}{\degA}%
    \FPabs{\degB}{\degB}%
    \VDDtriangletwoangles@ C:#2&#3:\degA,\degB{}
    \VDDgcopy@ ti&:C&
  }%
  \VDDcopy@#1&:ti&
}%
\def\VDDtrianglegelijkvormig#1:#2:#3 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@not\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#3
  \expandafter\VDDtrianglegelijkvormig@\VDDparse@tmp&
}%
\def\VDDtriangletwolengths@#1:#2&#3:#4,#5 {%
  {%
    \edef\VDD@tmpi{#4}\edef\VDD@tmpii{#5}
    \let\AC\VDD@tmpi\let\BC\VDD@tmpii
    \VDDcopy@ tmpi&tmpii&A&B&:#2&#3&tmpi&tmpii&
    \VDDcsub@ dirAB:B&A&
    \VDDcinnerproduct@\ip:dirAB&dirAB
    \FProot\length\ip{2}%
    \FPupn\divisor{2 \length{} \AC{} mul mul}%
    \FPifzero\divisor\errmessage{product of given lengths is zero?}\fi
    \FPupn\cos{\AC{} \AC{} mul \ip{} add \BC{} \BC{} mul sub \divisor{} div}%
    \FPiflt\cos{-1}\errmessage{given lengths too short, cos=\cos}\fi
    \FPifgt\cos{1}\errmessage{given lengths too short, cos=\cos}\fi
    \FPupn\degA{\cos{} arccos FPpi div 180 mul}%
    \VDDcanglehatx@\angleAB:dirAB
    \VDDaddangle@@\angleAC\angleAB\degA
    \VDDcdirvecangle@ dirAC:\angleAC:
    \VDDclincomb@ C:\AC*dirAC+1*A
    \VDDgcopy@ ti&:C&
  }%
  \VDDcopy@#1&:ti&
}%
\def\VDDtriangletwolengths#1:#2:#3 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@not\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDtriangletwolengths@\VDDparse@tmp:#3
}%
\catcode`@=12%
