random: don't assume random-bytes is a byte-vector

It's not anymore.
db4
Joe Groff 2011-11-16 10:03:00 -08:00
parent 40898bf4d0
commit 02df268261
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ ERROR: too-many-samples seq n ;
secure-random-generator get swap with-random ; inline
: uniform-random-float ( min max -- n )
4 random-bytes underlying>> uint deref >float
4 random-bytes underlying>> uint deref >float
4 random-bytes uint deref >float
4 random-bytes uint deref >float
2.0 32 ^ * +
[ over - 2.0 -64 ^ * ] dip
* + ; inline