summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex124
1 files changed, 62 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex
index 76b58bc0f16..aa98934e807 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex
@@ -9,7 +9,7 @@
% This file defines the trigonometric functions/functions.
%
-% Much of this file is based on ideas and code (particularly
+% Much of this file is based on ideas and code (particularly
% the old \pgfcoremath.code.tex) due to Till Tantau.
%
% Version 1.414213 29/9/2007
@@ -19,25 +19,25 @@
\pgfmathdeclarefunction{pi}{0}{\def\pgfmathresult{3.141592654}}
\pgfkeys{
- /pgf/trig format/.is choice,
- % attention: the luamath library will hook into these code keys.
- /pgf/trig format/deg/.code={\def\pgfmath@trig@format@choice{0}},
- /pgf/trig format/rad/.code={\def\pgfmath@trig@format@choice{1}},
- /pgf/trig format/deg,
+ /pgf/trig format/.is choice,
+ % attention: the luamath library will hook into these code keys.
+ /pgf/trig format/deg/.code={\def\pgfmath@trig@format@choice{0}},
+ /pgf/trig format/rad/.code={\def\pgfmath@trig@format@choice{1}},
+ /pgf/trig format/deg,
}
% Executes #1 if 'trig format=deg' and #2 otherwise.
\def\pgfmathiftrigonometricusesdeg#1#2{%
- \if0\pgfmath@trig@format@choice
- #1%
- \else
- #2%
- \fi
+ \if0\pgfmath@trig@format@choice
+ #1%
+ \else
+ #2%
+ \fi
}%
-% \pgfmathradians
-% (for compatibility with 1.18 beta, will be deprecated)
-%
+% \pgfmathradians
+% (for comptability with 1.18 beta, will be deprecated)
+%
% Convert #1 from radians to degrees (accurate to 1 deg).
%
\pgfmathdeclarefunction{radians}{1}{%
@@ -49,13 +49,13 @@
}%
% \pgfmathdeg
-%
+%
% Convert #1 from radians to degrees.
%
-\pgfmathdeclarefunction{deg}{1}{%
+\pgfmathdeclarefunction{deg}{1}{%
\begingroup%
\expandafter\pgfmath@x#1pt\relax%
- \pgfmath@scale@rad@to@deg\pgfmath@x
+ \pgfmath@scale@rad@to@deg\pgfmath@x
\pgfmath@returnone\pgfmath@x%
\endgroup%
}%
@@ -65,24 +65,24 @@
}%
% \pgfmathrad
-%
+%
% Convert #1 from degrees to radians.
%
-\pgfmathdeclarefunction{rad}{1}{%
+\pgfmathdeclarefunction{rad}{1}{%
\begingroup%
\expandafter\pgfmath@x#1pt\relax%
- \pgfmath@scale@deg@to@rad\pgfmath@x
+ \pgfmath@scale@deg@to@rad\pgfmath@x
\pgfmath@returnone\pgfmath@x%
\endgroup%
}%
\def\pgfmath@scale@deg@to@rad#1{%
- #1=3.14159#1%
+ #1=3.14159#1%
\divide#1180\relax%
}%
% \pgfmathsin
-%
+%
% Calculate the sine of #1 (in degrees).
%
\pgfmathdeclarefunction{sin}{1}{%
@@ -91,10 +91,10 @@
%
\begingroup%
\expandafter\pgfmath@x#1pt\relax%
- \if1\pgfmath@trig@format@choice
- % trig format=rad
- \pgfmath@scale@rad@to@deg\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice
+ % trig format=rad
+ \pgfmath@scale@rad@to@deg\pgfmath@x
+ \fi
\advance\pgfmath@x-90pt\relax%
\afterassignment\pgfmath@gobbletilpgfmath@
\expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@
@@ -128,7 +128,7 @@
}
% \pgfmathcos
-%
+%
% Calculate the cosine of #1 (in degrees).
%
\pgfmathdeclarefunction{cos}{1}{%
@@ -137,12 +137,12 @@
%
\begingroup%
\expandafter\pgfmath@x#1pt\relax%
- \if1\pgfmath@trig@format@choice
- % trig format=rad
- \pgfmath@scale@rad@to@deg\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice
+ % trig format=rad
+ \pgfmath@scale@rad@to@deg\pgfmath@x
+ \fi
\afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
+ \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
\divide\c@pgfmath@counta360\relax%
\multiply\c@pgfmath@counta-360\relax%
\advance\pgfmath@x\c@pgfmath@counta pt\relax%
@@ -173,7 +173,7 @@
}
% \pgfmathsincos
-%
+%
% Calculate the sin and cosine of #1 (in degrees).
%
\def\pgfmathsincos#1{%
@@ -186,7 +186,7 @@
}
% \pgfmathtan
-%
+%
% Calculate the tangent of #1 (in degrees).
%
\pgfmathdeclarefunction{tan}{1}{%
@@ -203,16 +203,16 @@
}
% \pgfmathcosec
-%
+%
% Calculate the cosec of #1 (in degrees).
%
-\pgfmathdeclarefunction{cosec}{1}{%
+\pgfmathdeclarefunction{cosec}{1}{%
\expandafter\pgfmathsin@\expandafter{#1}%
\pgfmathreciprocal@{\pgfmathresult}%
}
% \pgfmathsec
-%
+%
% Calculate the sec of #1 (in degrees).
%
\pgfmathdeclarefunction{sec}{1}{%
@@ -221,10 +221,10 @@
}
% \pgfmathcot
-%
+%
% Calculate the cotangent of #1 (in degrees).
%
-\pgfmathdeclarefunction{cot}{1}{%
+\pgfmathdeclarefunction{cot}{1}{%
\begingroup%
\edef\pgfmath@temparg{#1}%
\pgfmathsin@{\pgfmath@temparg}%
@@ -262,10 +262,10 @@
\ifdim\pgfmath@xa<0pt\relax%
\pgfmath@x-\pgfmath@x%
\fi%
- \if1\pgfmath@trig@format@choice
- % trig format=rad
- \pgfmath@scale@deg@to@rad\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice
+ % trig format=rad
+ \pgfmath@scale@deg@to@rad\pgfmath@x
+ \fi
\pgfmath@returnone\pgfmath@x%
\endgroup%
}
@@ -301,7 +301,7 @@
% \pgfmathacos
%
% The acos of #1
-%
+%
\pgfmathdeclarefunction{acos}{1}{%
\begingroup%
\pgfmath@x#1pt\relax%
@@ -318,10 +318,10 @@
\pgfmath@x-\pgfmath@x%
\advance\pgfmath@x by180pt\relax%
\fi%
- \if1\pgfmath@trig@format@choice
- % trig format=rad
- \pgfmath@scale@deg@to@rad\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice
+ % trig format=rad
+ \pgfmath@scale@deg@to@rad\pgfmath@x
+ \fi
\pgfmath@returnone\pgfmath@x%
\endgroup%
}
@@ -351,10 +351,10 @@
\ifdim\pgfmath@xa<0pt\relax%
\pgfmath@x-\pgfmath@x%
\fi%
- \if1\pgfmath@trig@format@choice
- % trig format=rad
- \pgfmath@scale@deg@to@rad\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice
+ % trig format=rad
+ \pgfmath@scale@deg@to@rad\pgfmath@x
+ \fi
\pgfmath@returnone\pgfmath@x%
\endgroup%
}
@@ -362,8 +362,8 @@
\pgfmathdeclarefunction{atan2}{2}{%
% Note: first parameter is y (!), second is x (!)
\begingroup%
- \let\pgfmath@trig@format@choice@@=\pgfmath@trig@format@choice
- \def\pgfmath@trig@format@choice{0}%
+ \let\pgfmath@trig@format@choice@@=\pgfmath@trig@format@choice
+ \def\pgfmath@trig@format@choice{0}%
\pgfmath@y=#1pt\relax%
\ifdim\pgfmath@y<0pt\relax%
\pgfmath@y=-\pgfmath@y%
@@ -402,12 +402,12 @@
\pgfmath@x=-\pgfmath@x%
\fi%
\fi%
- \if1\pgfmath@trig@format@choice@@
- % trig format=rad
- \pgfmath@scale@deg@to@rad\pgfmath@x
- \fi
+ \if1\pgfmath@trig@format@choice@@
+ % trig format=rad
+ \pgfmath@scale@deg@to@rad\pgfmath@x
+ \fi
\pgfmath@returnone\pgfmath@x%
- \endgroup%
+ \endgroup%
}
% This is needed since \pgfmathatan2 is not a legal macro name
@@ -557,7 +557,7 @@
\pgfmath@def{cosfrac}{94}{0.72862} \pgfmath@def{cosfrac}{95}{0.72499}
\pgfmath@def{cosfrac}{96}{0.72138} \pgfmath@def{cosfrac}{97}{0.71779}
\pgfmath@def{cosfrac}{98}{0.71421} \pgfmath@def{cosfrac}{99}{0.71065}
-\pgfmath@def{cosfrac}{100}{0.70710}
+\pgfmath@def{cosfrac}{100}{0.70710}
% Oh No! Some really loooooong tables.
\pgfmath@def{atan}{0}{0.00000} \pgfmath@def{atan}{1}{0.05729}
@@ -1060,8 +1060,8 @@
\pgfmath@def{atan}{994}{44.82759} \pgfmath@def{atan}{995}{44.85640}
\pgfmath@def{atan}{996}{44.88517} \pgfmath@def{atan}{997}{44.91392}
\pgfmath@def{atan}{998}{44.94264} \pgfmath@def{atan}{999}{44.97133}
-\pgfmath@def{atan}{1000}{45.00000}
-
+\pgfmath@def{atan}{1000}{45.00000}
+
\pgfmath@def{acos}{0}{90.00000} \pgfmath@def{acos}{1}{89.94270}
\pgfmath@def{acos}{2}{89.88540} \pgfmath@def{acos}{3}{89.82811}
\pgfmath@def{acos}{4}{89.77081} \pgfmath@def{acos}{5}{89.71352}