We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e749350 commit 5675292Copy full SHA for 5675292
README.md
@@ -1,7 +1,7 @@
1
# The Amplified Loaded Dice Roller
2
3
This repository contains a reference implementation in C of the Amplified
4
-Loaded Dice Roller (ALDR), a fast algorithm for generating rolls an
+Loaded Dice Roller (ALDR), a fast algorithm for generating rolls of an
5
$n$-sided die with rational probabilities.
6
7
## Building
sample.c
@@ -9,13 +9,16 @@
9
10
#include <stdio.h>
11
#include <stdlib.h>
12
+#include <time.h>
13
+
14
#include "aldr.h"
15
16
int main(int argc, char **argv) {
17
if (argc < 3) {
18
printf("usage: %s <n> <dist>\n", argv[0]);
19
exit(0);
20
}
21
+ srand(time(NULL));
22
int num_samples = atoi(argv[1]);
23
24
// Parse the distribution.
0 commit comments