psystem-particle-check   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/particles.xtm

Implementation

(bind-func psystem-particle-check
  (lambda (psys:psystem* idx)
    (let ((states (psystem_states psys))
    (size (psystem_size psys)))
      (if (> idx (- size 1)) -1
    (if (< (pref states idx) 1)
        idx
        (psystem-particle-check psys (+ idx 1)))))))


Back to Index