| 1575 | /* Implementation of a uniform distribution. */ |
| 1576 | static bool uniform_init = false; |
| 1577 | CUniform::CUniform(double min, double max) |
| 1578 | { |
| 1579 | if (!uniform_init) { |
| 1580 | uniform_init = true; |
| 1581 | srand(time(nullptr)); |
| 1582 | } |
| 1583 | this->min = min; |
| 1584 | this->max = max; |
| 1585 | } |
| 1586 | double CUniform::sample() |
| 1587 | { |
| 1588 | double rval = ((double)rand())/((double)RAND_MAX); |
nothing calls this directly
no outgoing calls
no test coverage detected