From 9d5b1ba8389e1ca9a5a8f537f6ed08c5fc50c171 Mon Sep 17 00:00:00 2001 From: sogaiu <983021772@users.noreply.github.com> Date: Fri, 24 Feb 2023 19:55:47 +0900 Subject: [PATCH] Tweak math/rng-int docs --- src/core/math.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/math.c b/src/core/math.c index f64c2485..9024d727 100644 --- a/src/core/math.c +++ b/src/core/math.c @@ -150,8 +150,8 @@ JANET_CORE_FN(cfun_rng_uniform, JANET_CORE_FN(cfun_rng_int, "(math/rng-int rng &opt max)", - "Extract a random random integer in the range [0, max] from the RNG. If " - "no max is given, the default is 2^31 - 1." + "Extract a random integer in the range [0, max) for max > 0 from the RNG. " + "If max is 0, return 0. If no max is given, the default is 2^31 - 1." ) { janet_arity(argc, 1, 2); JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);