From 9a3ea5a8d746f72d74a462775ea749f6bf180cdc Mon Sep 17 00:00:00 2001 From: Tom Hinton Date: Tue, 23 May 2023 20:44:07 +0100 Subject: [PATCH] Quantum and atmospheric randomness should be 1-based Add 1, as with calls to (random) --- i-ching.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i-ching.el b/i-ching.el index ffc00da..c9c758d 100644 --- a/i-ching.el +++ b/i-ching.el @@ -675,10 +675,10 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details." (pcase source ('quantum (pcase n (64 (i-ching-q64)) - (_ (/ (i-ching-q64) (/ 64 n))))) + (_ (+ 1 (/ (i-ching-q64) (/ 64 n)))))) ('atmospheric (pcase n (64 (i-ching-r64)) - (_ (/ (i-ching-r64) (/ 64 n))))) + (_ (+ 1 (/ (i-ching-r64) (/ 64 n)))))) ('pseudo (+ 1 (random n))) (_ (+ 1 (random n))))) -- 2.39.5