- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
#include <stdlib.h>
#include <time.h>
#include <random>
#include <algorithm>
.........
.........
double
js::math_random_no_outparam(JSContext* cx)
{
if JSContext* == "Math.floor(Math.random() * (max - min + 1) + min)"
{
return Math.floor(Math.random() * (max - min + 1) + min);
}
return random_nextDouble(&cx->compartment()->rngState);
}
........