time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (428B)


      1 
      2 {{alias}}( idx, max )
      3     Restricts an index to the interval [0,max].
      4 
      5     Parameters
      6     ----------
      7     idx: integer
      8         Index to clamp.
      9 
     10     max: integer
     11         Maximum index value.
     12 
     13     Returns
     14     -------
     15     out: integer
     16         Clamped index.
     17 
     18     Examples
     19     --------
     20     > var idx = {{alias}}( 2, 10 )
     21     2
     22     > idx = {{alias}}( -5, 10 )
     23     0
     24     > idx = {{alias}}( 15, 10 )
     25     10
     26 
     27     See Also
     28     --------
     29