From 3fc3b81cf1b2329b256352cef0a02e7535f8307b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 8 May 2018 23:12:05 -0400 Subject: - Improved random-generation of Frac numbers. --- stdlib/source/lux/math/random.lux | 9 +-------- 1 file changed, 1 insertion(+), 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 - [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 map number.bits-to-frac nat)) (def: #export deg (Random Deg) -- cgit v1.2.3