/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_real_to_int_function.html
ViewVC logotype

Contents of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_real_to_int_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3601 - (show annotations) (download) (as text)
Mon Sep 16 16:03:36 2019 UTC (4 years, 7 months ago) by schoenebeck
File MIME type: text/html
File size: 2088 byte(s)
* NKSP: Added recently added built-in functions to reference docs.
* NKSP: Added info about std units and finalness to existing functions.
* NKSP: Added recently added built-in constants ~NI_MATH_E and ~NI_MATH_PI.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>real_to_int() function</title>
5 <meta name="description" content="Type cast from real number to integer number.">
6 </head>
7 <body>
8 <h1>real_to_int()</h1>
9 <p>
10 Performs a type cast from real number to integer number, which means
11 it converts the passed <code lang="nksp">??real-number??</code> to an integer number
12 and returns the latter as result value.
13 </p>
14 <note>
15 Any fractional value behind the decimal point of <code>??real-number??</code>
16 is ignored by this conversion. So e.g. <code>real_to_int(3.999)</code> would
17 return <code>3</code>. If that's not what you want, then you might consider
18 using e.g. <code>round()</code> or <code>ceil()</code> before doing the
19 actual type conversion with this function.
20 </note>
21
22 <h3>Function Prototype</h3>
23 <p/>
24 <code lang="nksp">
25 real_to_int(??real-number??)
26 </code>
27
28 <h3>Arguments</h3>
29 <table>
30 <tr>
31 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
32 </tr>
33 <tr>
34 <td><code>??real-number??</code></td>
35 <td>Real&nbsp;Number</td>
36 <td>The real number to be converted.<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&nbsp;Number</td>
48 <td>Truncated Integer Number representation of the passed Real Number.</td>
49 </tr>
50 </table>
51
52 <h3>Remarks</h3>
53 <p>
54 This functions accepts any standard unit and finalness for its argument <code>??real-number??</code>.
55 The return value's standard unit and finalness is identical to the passed <code>??real-number??</code>'s one.
56 </p>
57
58 <h3>Examples</h3>
59 <p>None yet.</p>
60
61 <h3>See also</h3>
62 <p><code>int()</code>, <code>int_to_real()</code>, <code>round()</code>, <code>ceil()</code><p>
63
64 <h3>Availability</h3>
65 <p>Since LinuxSampler 2.1.1.svn6.<p>
66
67 </body>
68 </html>

  ViewVC Help
Powered by ViewVC