vmag   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/math.xtm

Implementation

(bind-func vmag
  (lambda (v:float* len:i64)
    (let ((mag 0.0)
          (i 0))
      (dotimes (i len)
        (set! mag (+ mag (* (pref v i) (pref v i)))))
      (sqrt mag))))


Back to Index

Similar Entries

  • vmag    xtlang