mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Issue #530 - Handle parsing of +i / -i
This commit is contained in:
parent
1f76d474f7
commit
6068b30ded
1 changed files with 4 additions and 1 deletions
|
@ -294,7 +294,10 @@
|
|||
(substring t 0 end)
|
||||
(substring t end (- len 1))))
|
||||
(real (string->number real-str))
|
||||
(imag (string->number imag-str))
|
||||
(imag (cond
|
||||
((equal? "+" imag-str) 1) ;; Special case, +i w/no number
|
||||
((equal? "-" imag-str) -1) ;; Special case, -i
|
||||
(else (string->number imag-str))))
|
||||
)
|
||||
(Cyc-make-rect real imag)))
|
||||
(else
|
||||
|
|
Loading…
Add table
Reference in a new issue