mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
common: expose pseudorand_double
This commit is contained in:
committed by
Rusty Russell
parent
77236caa91
commit
06a062f36b
@@ -44,6 +44,13 @@ uint64_t pseudorand_u64(void)
|
||||
return isaac64_next_uint64(&isaac64);
|
||||
}
|
||||
|
||||
double pseudorand_double(void)
|
||||
{
|
||||
init_if_needed();
|
||||
|
||||
return isaac64_next_double(&isaac64);
|
||||
}
|
||||
|
||||
const struct siphash_seed *siphash_seed(void)
|
||||
{
|
||||
init_if_needed();
|
||||
|
||||
@@ -13,6 +13,12 @@ uint64_t pseudorand(uint64_t max);
|
||||
*/
|
||||
uint64_t pseudorand_u64(void);
|
||||
|
||||
/**
|
||||
* pseudorand - pseudo (guessable!) random number between 0 (inclusive) and 1
|
||||
* (exclusive).
|
||||
*/
|
||||
double pseudorand_double(void);
|
||||
|
||||
/**
|
||||
* Get the siphash seed for hash tables.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user