summaryrefslogtreecommitdiff
path: root/lout/msg.h
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-09-01 23:46:23 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-09-10 07:01:06 +0200
commit8faec1d33e19bf86e2a1131daa48736e91497b67 (patch)
tree498dfe3512e7ef929e24140df80a586061be54f8 /lout/msg.h
parent7ba398c9019ee2cf2b0b93afe5428eacd77c60d4 (diff)
Generate boundary by choosing a random character
Instead of rejecting random characters that are not in the boundary character set, draw a random index and select the character at that position. The probability distribution is not perfectly uniform with this method, but reduces the number of calls to rand() by 4 times on average.
Diffstat (limited to 'lout/msg.h')
0 files changed, 0 insertions, 0 deletions