summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-12-25 22:01:58 +0000
committerKarl Berry <karl@freefriends.org>2020-12-25 22:01:58 +0000
commit1e611e5edb570cb045a27e8fa52e7ffa36ba2f29 (patch)
tree7ab33bc15b74c32c00a740fca680c541387320eb /Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
parent59ded7330e89e2fd397692f54866a264ef5ba679 (diff)
pgf (25dec20)
git-svn-id: svn://tug.org/texlive/trunk@57224 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
index 66bdd72b71e..da20ce024f0 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
@@ -185,10 +185,11 @@
\c@pgfmath@countc\c@pgfmath@countb%
% OK. Maybe #2 > #3.
\ifnum\c@pgfmath@counta>\c@pgfmath@countb\relax%
- \c@pgfmath@countc\c@pgfmath@countb%
- \c@pgfmath@countb\c@pgfmath@counta%
- \c@pgfmath@counta\c@pgfmath@countc%
+ \c@pgfmath@countc\c@pgfmath@counta%
+ \c@pgfmath@counta\c@pgfmath@countb%
+ \c@pgfmath@countb\c@pgfmath@countc%
\fi%
+ \c@pgfmath@countd\c@pgfmath@counta
\advance\c@pgfmath@countc1\relax%
\advance\c@pgfmath@countc-\c@pgfmath@counta%
\pgfmathgeneratepseudorandomnumber%
@@ -197,7 +198,7 @@
\divide\c@pgfmath@countb\c@pgfmath@countc%
\multiply\c@pgfmath@countb-\c@pgfmath@countc%
\advance\c@pgfmath@counta\c@pgfmath@countb%
- \pgfmathaddtocount\c@pgfmath@counta{#2}%
+ \advance\c@pgfmath@counta\c@pgfmath@countd
\edef\pgfmathresult{\the\c@pgfmath@counta}%
\pgfmath@smuggleone{\pgfmathresult}%
\endgroup%
@@ -209,7 +210,7 @@
% Create a list to be used with \pgfmathrandomelement.
%
% #1 - the name of the list
-% #2 - a list of comma separated elements.
+% #2 - a list of elements (e.g., {item-1}{item-2}...{item-n}).
%
\def\pgfmathdeclarerandomlist#1#2{%
\def\pgfmath@randomlistname{#1}%