File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
lib/node_modules/@stdlib/stats/base/dists/bernoulli/quantile Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,15 @@ static double tic( void ) {
7575}
7676
7777/**
78- * Generates a random number on the interval [0,1 ).
78+ * Generates a random number on the interval [min,max ).
7979*
80- * @return random number
80+ * @param min minimum value (inclusive)
81+ * @param max maximum value (exclusive)
82+ * @return random number
8183*/
82- static double rand_double ( void ) {
83- int r = rand ();
84- return ( double ) r / ( ( double ) RAND_MAX + 1.0 );
84+ static double random_uniform ( const double min , const double max ) {
85+ double v = ( double ) rand () / ( ( double ) RAND_MAX + 1.0 );
86+ return min + ( v * ( max - min ) );
8587}
8688
8789/**
Original file line number Diff line number Diff line change 3838 "libraries" : [],
3939 "libpath" : [],
4040 "dependencies" : [
41- " @stdlib/math/base/napi/biary " ,
42- " @stdlib/math/base/assert/is_nan "
41+ " @stdlib/math/base/napi/binary " ,
42+ " @stdlib/math/base/assert/is-nan "
4343 ]
4444 },
4545 {
5454 "libraries" : [],
5555 "libpath" : [],
5656 "dependencies" : [
57- " @stdlib/math/base/assert/is_nan "
57+ " @stdlib/math/base/assert/is-nan "
5858 ]
5959 },
6060 {
6969 "libraries" : [],
7070 "libpath" : [],
7171 "dependencies" : [
72- " @stdlib/math/base/assert/is_nan "
72+ " @stdlib/math/base/assert/is-nan "
7373 ]
7474 }
7575 ]
You can’t perform that action at this time.
0 commit comments