This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathatan2.xml
More file actions
45 lines (45 loc) · 2.56 KB
/
Copy pathatan2.xml
File metadata and controls
45 lines (45 loc) · 2.56 KB
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
<doc>
<legacy_id>1410</legacy_id>
<name>atan2</name>
<type>function</type>
<syntax>
<example>atan2(<i>yCoordinate</i>,<i>xCoordinate</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Math, Logic, & Dates</category>
</classification>
<references>
<constant tag="pi">pi Constant</constant>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> the arc tangent of one number divided by another, using the <glossary tag="sign">sign</glossary> of both.</summary>
<examples>
<example>atan2(-1,-1) <i>-- returns 4/3 * pi</i></example>
<example>atan2(thisNumber,thatNumber)</example>
</examples>
<description>
<p>Use the <b>atan2</b> <control_st tag="function">function</control_st> to find the arc tangent of one number divided by another when <glossary tag="sign">sign</glossary> is significant.</p><p/><p><b>Parameters:</b></p><p>The <i>yCoordinate</i> is a number or an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p>The <i>xCoordinate</i> is a number or an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p><b>Value:</b></p><p>The <b>atan2</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a number between -pi and pi.</p><p/><p><b>Comments:</b></p><p>In most cases, atan2(y,x) is equal to atan(y/x). However, if both x and y are negative, the sign of x/y is positive. In this case, the <b>atan</b> function <glossary tag="return">returns</glossary> an angle in the first quadrant, but the <b>atan2</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> an angle in the third quadrant.</p><p/><p>The result of the <b>atan2</b> <control_st tag="function">function</control_st> is <glossary tag="return">returned</glossary> in <glossary tag="radian">radians</glossary>. To get this result in <glossary tag="degree">degrees</glossary>, use the following <href tag="dictionary/property/2381.xml">custom function</href>:</p><p/><p> function atan2InDegrees firstArg,secondArg</p><p> return atan2(firstArg,secondArg) * 180 / pi</p><p> end atan2InDegrees</p>
</description>
</doc>