Crect   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm

Implementation

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; some simple helpers for complex numbers in extempore
;;
(bind-func Crect
  (lambda (real imag)
    (let ((num:gsl_complex* (alloc))
    (n (tref-ptr num 0))) ;
      (aset! n 0 real)
      (aset! n 1 imag)
      num)))


Back to Index