Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions reference/random/functions/lcg-value.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
to the product of both primes.
</para>
&caution.cryptographically-insecure;
<caution>
<para>
Scaling the return value to a different interval using multiplication
or addition (a so-called affine transformation) might result in a bias
in the resulting value as floats are not equally dense across the number
line. As not all values can be exactly represented by a float, the
result of the affine transformation might also result in values outside
of the requested interval.
</para>
<para>
Use <methodname>Random\Randomizer::getFloat</methodname> to generate a
random float within an arbitrary interval. Use <methodname>Random\Randomizer::getInt</methodname>
to generate a random integer within an arbitrary interval.
</para>
</caution>
</refsect1>

<refsect1 role="parameters">
Expand Down