1 |
<html> |
2 |
<head> |
3 |
<meta name="author" content="Christian Schoenebeck"> |
4 |
<title>sh_right() function</title> |
5 |
<meta name="description" content="Calculates a right bit shifted value."> |
6 |
</head> |
7 |
<body> |
8 |
<h1>sh_right()</h1> |
9 |
<p> |
10 |
Calculates right bit shifted values. |
11 |
The original value of the 1st argument is bit shifted to the right as |
12 |
many times as requested by the 2nd argument and the result of this |
13 |
bit shift operation is returned by this function. |
14 |
</p> |
15 |
|
16 |
<h3>Function Prototype</h3> |
17 |
<p/> |
18 |
<code lang="nksp"> |
19 |
sh_right(??number??, ??shifts??) |
20 |
</code> |
21 |
|
22 |
<h3>Arguments</h3> |
23 |
<table> |
24 |
<tr> |
25 |
<th>Argument Name</th> <th>Data Type</th> <th>Description</th> |
26 |
</tr> |
27 |
<tr> |
28 |
<td><code>??number??</code></td> |
29 |
<td>Integer Number</td> |
30 |
<td>Original input value to be shifted.<br> |
31 |
[required]</td> |
32 |
</tr> |
33 |
<tr> |
34 |
<td><code>??shifts??</code></td> |
35 |
<td>Integer Number</td> |
36 |
<td>Amount of times the original value should be shifted to the right.<br> |
37 |
[required]</td> |
38 |
</tr> |
39 |
</table> |
40 |
|
41 |
<h3>Return Value</h3> |
42 |
<table> |
43 |
<tr> |
44 |
<th>Data Type</th> <th>Description</th> |
45 |
</tr> |
46 |
<tr> |
47 |
<td>Integer Number</td> |
48 |
<td>Bit shifted result.</td> |
49 |
</tr> |
50 |
</table> |
51 |
|
52 |
<h3>Examples</h3> |
53 |
<p/> |
54 |
<code> |
55 |
on init |
56 |
message("sh_right(128,0) = " & sh_right(128,0)) |
57 |
message("sh_right(128,1) = " & sh_right(128,1)) |
58 |
message("sh_right(128,2) = " & sh_right(128,2)) |
59 |
message("sh_right(128,3) = " & sh_right(128,3)) |
60 |
end on |
61 |
</code> |
62 |
|
63 |
<h3>See also</h3> |
64 |
<p><code>sh_left()</code><p> |
65 |
|
66 |
<h3>Availability</h3> |
67 |
<p>Since LinuxSampler 2.0.0.svn22.<p> |
68 |
|
69 |
</body> |
70 |
</html> |