Quantum and atmospheric randomness should be 1-based

Add 1, as with calls to (random)
This commit is contained in:
Tom Hinton 2023-05-23 20:44:07 +01:00 committed by GitHub
parent 54f19e2dcb
commit 9a3ea5a8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -675,10 +675,10 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
(pcase source (pcase source
('quantum (pcase n ('quantum (pcase n
(64 (i-ching-q64)) (64 (i-ching-q64))
(_ (/ (i-ching-q64) (/ 64 n))))) (_ (+ 1 (/ (i-ching-q64) (/ 64 n))))))
('atmospheric (pcase n ('atmospheric (pcase n
(64 (i-ching-r64)) (64 (i-ching-r64))
(_ (/ (i-ching-r64) (/ 64 n))))) (_ (+ 1 (/ (i-ching-r64) (/ 64 n))))))
('pseudo (+ 1 (random n))) ('pseudo (+ 1 (random n)))
(_ (_
(+ 1 (random n))))) (+ 1 (random n)))))