summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-12 20:45:15 +0000
committerKarl Berry <karl@freefriends.org>2019-07-12 20:45:15 +0000
commitaebf7cb9eaabd4c0092643c77009a567ede155dc (patch)
treefa4aae570987002e252dd9c3d3b96b7571f03848 /Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
parent2d83a76b7d0fa40bf7b1c90280ee3388258a73f3 (diff)
pgf (12jul19)
git-svn-id: svn://tug.org/texlive/trunk@51626 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.tex8
1 files changed, 4 insertions, 4 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 531383dfdcd..03be2abfd33 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
@@ -180,9 +180,8 @@
%
\def\pgfmathrandominteger#1#2#3{%
\begingroup%
- \pgfmathgeneratepseudorandomnumber%
- \c@pgfmath@counta#2\relax%
- \c@pgfmath@countb#3\relax%
+ \pgfmathsetcount\c@pgfmath@counta{#2}%
+ \pgfmathsetcount\c@pgfmath@countb{#3}%
\c@pgfmath@countc\c@pgfmath@countb%
% OK. Maybe #2 > #3.
\ifnum\c@pgfmath@counta>\c@pgfmath@countb\relax%
@@ -192,12 +191,13 @@
\fi%
\advance\c@pgfmath@countc1\relax%
\advance\c@pgfmath@countc-\c@pgfmath@counta%
+ \pgfmathgeneratepseudorandomnumber%
\c@pgfmath@counta\pgfmathresult\relax%
\c@pgfmath@countb\c@pgfmath@counta%
\divide\c@pgfmath@countb\c@pgfmath@countc%
\multiply\c@pgfmath@countb-\c@pgfmath@countc%
\advance\c@pgfmath@counta\c@pgfmath@countb%
- \advance\c@pgfmath@counta#2\relax%
+ \pgfmathaddtocount\c@pgfmath@counta{#2}%
\edef\pgfmathresult{\the\c@pgfmath@counta}%
\pgfmath@smuggleone{\pgfmathresult}%
\endgroup%