mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix rand_real to return random number [0,1) not [0,1].
This commit is contained in:
@@ -90,7 +90,7 @@ static double
|
||||
rand_real(rand_state *t)
|
||||
{
|
||||
uint32_t x = rand_uint32(t);
|
||||
return x*(1.0/4294967295.0);
|
||||
return x*(1.0/4294967296.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user