1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
<refentry id="taninv2">
<indexterm id="IndexTaninv2"><primary>taninv2</primary></indexterm>
<refentryinfo><title>Mathematical Operations:Opcode Equivalents of Functions</title></refentryinfo>
<refmeta>
<refentrytitle>taninv2</refentrytitle>
</refmeta>
<refnamediv>
<refname>taninv2</refname>
<refpurpose>
Returns an arctangent.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Returns the arctangent of <emphasis>iy/ix</emphasis>, <emphasis>ky/kx</emphasis>, or <emphasis>ay/ax</emphasis>.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>ares <command>taninv2</command> ay, ax</synopsis>
<synopsis>ires <command>taninv2</command> iy, ix</synopsis>
<synopsis>kres <command>taninv2</command> ky, kx</synopsis>
<synopsis>...<command>taninv2</command>(ky, kx)... (no rate restriction)</synopsis>
<para>
Returns the arctangent of <emphasis>iy/ix</emphasis>, <emphasis>ky/kx</emphasis>, or <emphasis>ay/ax</emphasis>. If <emphasis>y</emphasis> is zero, <emphasis>taninv2</emphasis> returns zero regardless of the value of <emphasis>x</emphasis>. If <emphasis>x</emphasis> is zero, the return value is:
<itemizedlist>
<listitem><para><emphasis>π/2</emphasis>, if <emphasis>y</emphasis> is positive.</para></listitem>
<listitem><para><emphasis>-π/2</emphasis>, if <emphasis>y</emphasis> is negative.</para></listitem>
<listitem><para><emphasis>0</emphasis>, if <emphasis>y</emphasis> is 0.</para></listitem>
</itemizedlist>
</para>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>iy, ix</emphasis> -- values to be converted
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>ky, kx</emphasis> -- control rate signals to be converted
</para>
<para>
<emphasis>ay, ax</emphasis> -- audio rate signals to be converted
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the taninv2 opcode. It uses the file <ulink url="examples/taninv2.csd"><citetitle>taninv2.csd</citetitle></ulink>.
<example>
<title>Example of the taninv2 opcode.</title>
<para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
<xi:include href="examples-xml/taninv2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
Its output should include a line like this:
<screen>instr 1: i1 = 0.464</screen>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="taninv"><citetitle>taninv</citetitle></link>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &namejohn;</member>
<member>University of Bath/Codemist Ltd.</member>
<member>Bath, UK</member>
<member>April 1998</member>
</simplelist>
</para>
<para>Example written by &namekevin;.</para>
<para>New in Csound version 3.48</para>
<para>Corrected on May 2002, thanks to &nameistvan;.</para>
<para>Available as a function in version 6.00</para>
</refsect1>
</refentry>
|