Debian Codegraph @

texmf-dist/source/latex/wargame/util/randomid.dtx

raw
1 % \iffalse
2 % --------------------------------------------------------------------
3 % <*utils>
4 % \fi
5 %
6 % \subsubsection{Random IDs}
7 %
8 % This macro sets the macro \cs{wg@uuid} to some random hex number.
9 %
10 % \begin{macrocode}
11 \def\wg@r@ndom@id{%
12 \def\wg@uuid{}
13 \foreach \i in {1,...,8}{%
14 \pgfmathparse{Hex(random(0,15))}
15 \xdef\wg@uuid{\wg@uuid\pgfmathresult}}}
16 % \end{macrocode}
17 %
18 %
19 % \iffalse
20 % --------------------------------------------------------------------
21 % </utils>
22 % \fi