diff options
author | ubq323 <ubq323@ubq323.website> | 2024-07-11 15:43:18 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-07-11 15:43:18 +0100 |
commit | d9d307bc676387ab8894f9fb1ee722db8ecf7272 (patch) | |
tree | 135a8ca920a16c7f46cb6cf6b65d6e982163671e /tests/mandel.bth | |
parent | d8d3770f88d6acc37620d6577fa5a0b026fb1231 (diff) |
set -> set!
Diffstat (limited to 'tests/mandel.bth')
-rw-r--r-- | tests/mandel.bth | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/mandel.bth b/tests/mandel.bth index e75d694..43dc58b 100644 --- a/tests/mandel.bth +++ b/tests/mandel.bth @@ -1,20 +1,20 @@ -(set pxy 0) +(set! pxy 0) (while (< pxy 30) - (set cim (/ (- pxy 15) 15)) - (set pxx 0) + (set! cim (/ (- pxy 15) 15)) + (set! pxx 0) (while (< pxx 60) - (set cre (/ (- pxx 40) 20)) - (set i 0) - (set zim cim) - (set zre cre) + (set! cre (/ (- pxx 40) 20)) + (set! i 0) + (set! zim cim) + (set! zre cre) (while (< i 25) - (set nzre (+ cre (- (* zre zre) (* zim zim)))) - (set nzim (+ cim (* 2 (* zre zim)))) - (set zre nzre) - (set zim nzim) - (set mag (+ (* zre zre) (* zim zim))) - (set i (if (< mag 4) (+ i 1) 999))) + (set! nzre (+ cre (- (* zre zre) (* zim zim)))) + (set! nzim (+ cim (* 2 (* zre zim)))) + (set! zre nzre) + (set! zim nzim) + (set! mag (+ (* zre zre) (* zim zim))) + (set! i (if (< mag 4) (+ i 1) 999))) (write (if (< mag 4) "#" ".")) - (set pxx (+ pxx 1))) + (set! pxx (+ pxx 1))) (say "") - (set pxy (+ pxy 1))) + (set! pxy (+ pxy 1))) |