random: generate rather than fill coordinate types

This commit is contained in:
Danny Robson 2019-04-10 14:06:35 +10:00
parent 3186d300a1
commit 6f440d0bcf

View File

@ -138,8 +138,9 @@ namespace cruft::random {
ValueT
uniform (void)
{
ValueT res {};
std::fill (res.begin (), res.end (), uniform<typename ValueT::value_type> ());
ValueT res;
for (auto &v: res)
v = uniform<typename ValueT::value_type> ();
return res;
}