Skip to content

Commit

Permalink
pgfmathrandominteger: reordering of arguments incomplete #954
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Dec 14, 2020
1 parent 7da3ef4 commit 8a997bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tex/generic/pgf/math/pgfmathfunctions.random.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand All @@ -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%
Expand Down

0 comments on commit 8a997bb

Please sign in to comment.