1 |
schoenebeck |
2971 |
<html> |
2 |
|
|
<head> |
3 |
|
|
<meta name="author" content="Christian Schoenebeck"> |
4 |
|
|
<title>min() function</title> |
5 |
|
|
<meta name="description" content="Calculates the minimum value of two given values."> |
6 |
|
|
</head> |
7 |
|
|
<body> |
8 |
|
|
<h1>min()</h1> |
9 |
|
|
<p> |
10 |
|
|
Returns the minimum value of the passed two value arguments. |
11 |
|
|
That means, it compares the two passed values with each other and |
12 |
|
|
returns the one which is smaller. |
13 |
|
|
</p> |
14 |
|
|
|
15 |
|
|
<h3>Function Prototype</h3> |
16 |
|
|
<p/> |
17 |
|
|
<code lang="nksp"> |
18 |
|
|
min(??number1??,??number2??) |
19 |
|
|
</code> |
20 |
|
|
|
21 |
|
|
<h3>Arguments</h3> |
22 |
|
|
<table> |
23 |
|
|
<tr> |
24 |
|
|
<th>Argument Name</th> <th>Data Type</th> <th>Description</th> |
25 |
|
|
</tr> |
26 |
|
|
<tr> |
27 |
|
|
<td><code>??number1??</code></td> |
28 |
|
|
<td>Integer Number</td> |
29 |
|
|
<td>One of the two numbers to compare with.<br> |
30 |
|
|
[required]</td> |
31 |
|
|
</tr> |
32 |
|
|
<tr> |
33 |
|
|
<td><code>??number2??</code></td> |
34 |
|
|
<td>Integer Number</td> |
35 |
|
|
<td>One of the two numbers to compare with.<br> |
36 |
|
|
[required]</td> |
37 |
|
|
</tr> |
38 |
|
|
</table> |
39 |
|
|
|
40 |
|
|
<h3>Return Value</h3> |
41 |
|
|
<table> |
42 |
|
|
<tr> |
43 |
|
|
<th>Description</th> <th>Data Type</th> |
44 |
|
|
</tr> |
45 |
|
|
<tr> |
46 |
|
|
<td>Smallest number of the passed two values.</td> |
47 |
|
|
<td>Integer Number</td> |
48 |
|
|
</tr> |
49 |
|
|
</table> |
50 |
|
|
|
51 |
|
|
<h3>Examples</h3> |
52 |
|
|
<p> |
53 |
|
|
The following example prints the result of some example argument |
54 |
|
|
values to the terminal as soon as the script is loaded. |
55 |
|
|
<p/> |
56 |
|
|
<code> |
57 |
|
|
on init |
58 |
|
|
message("min(2,3) = " & min(2,3)) |
59 |
|
|
message("min(1,11) = " & min(1,11)) |
60 |
|
|
message("min(-30,4) = " & min(-30,4)) |
61 |
|
|
end on |
62 |
|
|
</code> |
63 |
|
|
|
64 |
schoenebeck |
3196 |
<h3>Availability</h3> |
65 |
schoenebeck |
2971 |
<p>Since LinuxSampler 2.0.0.svn23.<p> |
66 |
|
|
|
67 |
|
|
</body> |
68 |
|
|
</html> |