Add random::uniform(rng) that returns [0, 1]
This commit is contained in:
parent
44db0e8fee
commit
8985436906
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,12 @@ namespace psemek::random
|
|||
return uniform<T>(rng, {min, max});
|
||||
}
|
||||
|
||||
template <typename T, typename RNG>
|
||||
T uniform(RNG && rng)
|
||||
{
|
||||
return uniform<T>(rng, T{0}, T{1});
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N, typename RNG>
|
||||
geom::point<T, N> uniform(RNG && rng, geom::box<T, N> const & box)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue