vmax   xtlang


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

Implementation

(bind-func vmax
  (lambda (buf:i32* len:i64)
    (let ((max_val (pref buf 0))
          (i 0))
      (dotimes (i len)
        (if (> (pref buf i) max_val)
            (set! max_val (pref buf i))))
      max_val)))


Back to Index

Similar Entries