From fd1dfd7d651e33ef89930359b9cf9dd325116565 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 19 May 2026 18:59:23 +0200 Subject: [PATCH] ADDED: `rprand_get_value_raw()` --- src/external/rprand.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/external/rprand.h b/src/external/rprand.h index cdef03c01..b71395415 100644 --- a/src/external/rprand.h +++ b/src/external/rprand.h @@ -1,6 +1,6 @@ /********************************************************************************************** * -* rprand v1.0 - A simple and easy-to-use pseudo-random numbers generator (PRNG) +* rprand v1.1 - A simple and easy-to-use pseudo-random numbers generator (PRNG) * * FEATURES: * - Pseudo-random values generation, 32 bits: [0..4294967295] @@ -118,6 +118,7 @@ extern "C" { // Prevents name mangling of functions //---------------------------------------------------------------------------------- RPRANDAPI void rprand_set_seed(unsigned long long seed); // Set rprand_state for Xoshiro128**, seed is 64bit RPRANDAPI int rprand_get_value(int min, int max); // Get random value within a range, min and max included +RPRANDAPI int rprand_get_value_raw(void); // Get random value, Xoshiro128** generator (uses global rprand_state) RPRANDAPI int *rprand_load_sequence(unsigned int count, int min, int max); // Load pseudo-random numbers sequence with no duplicates RPRANDAPI void rprand_unload_sequence(int *sequence); // Unload pseudo-random numbers sequence @@ -186,6 +187,13 @@ int rprand_get_value(int min, int max) return value; } +int rprand_get_value_raw(void) +{ + int value = rprand_xoshiro(); + + return value; +} + // Load pseudo-random numbers sequence with no duplicates, min and max included int *rprand_load_sequence(unsigned int count, int min, int max) {