#include "AppHdr.h"#include <stdint.h>#include "random.h"

Defines | |
| #define | UINT32_MAX ((uint32_t)(-1)) |
Functions | |
| int | random_range (int low, int high) |
| int | random_range (int low, int high, int nrolls) |
| int | random_choose (int first,...) |
| const char * | random_choose_string (const char *first,...) |
| int | random_choose_weighted (int weight, int first,...) |
| int | random2 (int max) |
| bool | coinflip (void) |
| int | maybe_random2 (int x, bool random_factor) |
| int | maybe_roll_dice (int num, int size, bool random) |
| int | roll_dice (int num, int size) |
| dice_def | calc_dice (int num_dice, int max_damage) |
| void | scale_dice (dice_def &dice, int threshold) |
| int | div_rand_round (int num, int den) |
| int | bestroll (int max, int rolls) |
| int | random2avg (int max, int rolls) |
| int | random2limit (int max, int limit) |
| int | binomial_generator (unsigned n_trials, unsigned trial_prob) |
| bool | one_chance_in (int a_million) |
| bool | x_chance_in_y (int x, int y) |
| int | fuzz_value (int val, int lowfuzz, int highfuzz, int naverage) |
| #define UINT32_MAX ((uint32_t)(-1)) |
| int bestroll | ( | int | max, | |
| int | rolls | |||
| ) |

| int binomial_generator | ( | unsigned | n_trials, | |
| unsigned | trial_prob | |||
| ) |

| dice_def calc_dice | ( | int | num_dice, | |
| int | max_damage | |||
| ) |

| bool coinflip | ( | void | ) |

| int div_rand_round | ( | int | num, | |
| int | den | |||
| ) |

| int fuzz_value | ( | int | val, | |
| int | lowfuzz, | |||
| int | highfuzz, | |||
| int | naverage | |||
| ) |

| int maybe_random2 | ( | int | x, | |
| bool | random_factor | |||
| ) |

| int maybe_roll_dice | ( | int | num, | |
| int | size, | |||
| bool | random | |||
| ) |

| bool one_chance_in | ( | int | a_million | ) |

| int random2 | ( | int | max | ) |

| int random2avg | ( | int | max, | |
| int | rolls | |||
| ) |

| int random2limit | ( | int | max, | |
| int | limit | |||
| ) |

| int random_choose | ( | int | first, | |
| ... | ||||
| ) |

| const char* random_choose_string | ( | const char * | first, | |
| ... | ||||
| ) |

| int random_choose_weighted | ( | int | weight, | |
| int | first, | |||
| ... | ||||
| ) |

| int random_range | ( | int | low, | |
| int | high, | |||
| int | nrolls | |||
| ) |

| int random_range | ( | int | low, | |
| int | high | |||
| ) |

| int roll_dice | ( | int | num, | |
| int | size | |||
| ) |

| void scale_dice | ( | dice_def & | dice, | |
| int | threshold | |||
| ) |
| bool x_chance_in_y | ( | int | x, | |
| int | y | |||
| ) |

1.5.6