summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex87
1 files changed, 11 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
index 57db0d20ba2..028546dde89 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
@@ -568,8 +568,8 @@
%
% #1 = a time
% #2 = center of a ellipse
-% #3 = 0-degree exis of the ellipse
-% #4 = 90-degree exis of the ellipse
+% #3 = 0-degree axis of the ellipse
+% #4 = 90-degree axis of the ellipse
% #5 = start angle of an arc on the ellipse
% #6 = end angle of an arc on the ellipse
%
@@ -851,11 +851,11 @@
\def\pgfpointxyz#1#2#3{%
\pgfmathparse{#1}%
- \let\pgftemp@x=\pgfmathresult%
+ \global\let\pgftemp@x=\pgfmathresult%
\pgfmathparse{#2}%
- \let\pgftemp@y=\pgfmathresult%
+ \global\let\pgftemp@y=\pgfmathresult%
\pgfmathparse{#3}%
- \let\pgftemp@z=\pgfmathresult%
+ \global\let\pgftemp@z=\pgfmathresult%
\global\pgf@x=\pgftemp@x\pgf@xx%
\global\advance\pgf@x by \pgftemp@y\pgf@yx%
\global\advance\pgf@x by \pgftemp@z\pgf@zx%
@@ -943,77 +943,12 @@
\def\pgfpointnormalised#1{%
\pgf@process{#1}%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \ifdim\pgf@x<0pt\relax% move into first quadrant
- \global\pgf@x=-\pgf@x%
- \fi%
- \ifdim\pgf@y<0pt\relax%
- \pgf@y=-\pgf@y%
- \fi%
- \ifdim\pgf@x>\pgf@y% x > y
- % make point small
- \c@pgf@counta=\pgf@x%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta=0\relax%
- \c@pgf@counta=1\relax%
- \fi%
- \global\divide\pgf@x by\c@pgf@counta%
- \global\divide\pgf@y by\c@pgf@counta%
- \divide\pgf@xa by\c@pgf@counta%
- \divide\pgf@ya by\c@pgf@counta%
- % ok.
- \global\pgf@x=.125\pgf@x%
- \global\pgf@y=.125\pgf@y%
- \c@pgf@counta=\pgf@x%
- \c@pgf@countb=\pgf@y%
- \multiply\c@pgf@countb by 100%
- \ifnum\c@pgf@counta<64\relax%
- \global\pgf@x=1pt\relax%
- \global\pgf@y=0pt\relax%
- \else%
- \divide\c@pgf@countb by \c@pgf@counta%
- \global\pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta%
- \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
- \global\pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
- \fi%
- \ifdim\pgf@xa<0pt%
- \global\pgf@x=-\pgf@x%
- \fi%
- \else% x <= y
- % make point small
- \c@pgf@counta=\pgf@y%
- \divide\c@pgf@counta by 65536\relax%
- \ifnum\c@pgf@counta=0\relax%
- \c@pgf@counta=1\relax%
- \fi%
- \global\divide\pgf@x by\c@pgf@counta%
- \global\divide\pgf@y by\c@pgf@counta%
- \divide\pgf@xa by\c@pgf@counta%
- \divide\pgf@ya by\c@pgf@counta%
- % ok.
- \global\pgf@x=.125\pgf@x%
- \global\pgf@y=.125\pgf@y%
- \c@pgf@counta=\pgf@y%
- \c@pgf@countb=\pgf@x%
- \multiply\c@pgf@countb by 100%
- \ifnum\c@pgf@counta<64\relax%
- \global\pgf@y=1pt\relax%
- \global\pgf@x=0pt\relax%
- \else%
- \divide\c@pgf@countb by \c@pgf@counta%
- \global\pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt%
- \pgf@xc=8192pt%
- \divide\pgf@xc by\c@pgf@counta%
- \global\pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
- \global\pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
- \fi%
- \ifdim\pgf@ya<0pt%
- \global\pgf@y=-\pgf@y%
- \fi%
- \fi\ignorespaces%
+ \pgfmathatantwo{\the\pgf@y}{\the\pgf@x}%
+ \let\pgf@tmp=\pgfmathresult%
+ \pgfmathcos@{\pgf@tmp}%
+ \pgf@x=\pgfmathresult pt\relax%
+ \pgfmathsin@{\pgf@tmp}%
+ \pgf@y=\pgfmathresult pt\relax%
}