diff options
author | Eduardo Julian | 2018-05-08 23:12:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-08 23:12:05 -0400 |
commit | 3fc3b81cf1b2329b256352cef0a02e7535f8307b (patch) | |
tree | c7b8c590b488284a98f64a870e6ee6a9c6ad5c2a /stdlib/source | |
parent | 3b80f40384a8af8770a7c4f1be8b334ceb950a27 (diff) |
- Improved random-generation of Frac numbers.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/math/random.lux | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux index 695323c98..e90c3eb6d 100644 --- a/stdlib/source/lux/math/random.lux +++ b/stdlib/source/lux/math/random.lux @@ -90,14 +90,7 @@ (def: #export frac (Random Frac) - (do Monad<Random> - [left (bits +26) - right (bits +27)] - (wrap (|> right - (n/+ (bit.left-shift +27 left)) - nat-to-int - int-to-frac - (f// (|> +1 (bit.left-shift +53) nat-to-int int-to-frac)))))) + (:: Monad<Random> map number.bits-to-frac nat)) (def: #export deg (Random Deg) |