From df5e301be3f0774da1aeac1c9992f7642a6d4b37 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 5 May 2022 18:25:20 -0700 Subject: [PATCH] neatogen: remove unused 'rk_double' --- lib/neatogen/randomkit.c | 8 -------- lib/neatogen/randomkit.h | 5 ----- 2 files changed, 13 deletions(-) diff --git a/lib/neatogen/randomkit.c b/lib/neatogen/randomkit.c index ef76f88f7..1a76e4f93 100644 --- a/lib/neatogen/randomkit.c +++ b/lib/neatogen/randomkit.c @@ -189,11 +189,3 @@ rk_interval(unsigned long max, rk_state *state) #endif return value; } - -double -rk_double(rk_state *state) -{ - /* shifts : 67108864 = 0x4000000, 9007199254740992 = 0x20000000000000 */ - long a = rk_random(state) >> 5, b = rk_random(state) >> 6; - return (a * 67108864.0 + b) / 9007199254740992.0; -} diff --git a/lib/neatogen/randomkit.h b/lib/neatogen/randomkit.h index 8d4373036..de0e0d066 100644 --- a/lib/neatogen/randomkit.h +++ b/lib/neatogen/randomkit.h @@ -135,11 +135,6 @@ extern unsigned long rk_ulong(rk_state *state); */ extern unsigned long rk_interval(unsigned long max, rk_state *state); -/* - * Returns a random double between 0.0 and 1.0, 1.0 excluded. - */ -extern double rk_double(rk_state *state); - #ifdef __cplusplus } #endif -- 2.40.0