clamp   macro


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define-macro (clamp x minval maxval)
  `(if (> ,x ,maxval) ,maxval
       (if (< ,x ,minval) ,minval
           ,x)))


Back to Index

Similar Entries

  • cpBBClampVect    xtlang
  • cpvclamp    xtlang
  • xtm_clampf    xtlang