atan: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|ATAN]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|ATAN]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|ATAN]]
[[Category:Scripting Commands ArmA|ATAN]]


| ofp |= Game name


<h2 style="color:#000066">'''atan ''x'''''</h2>
|1.00|= Game version
____________________________________________________________________________________________


| Arctangens of a number, result in degrees. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| '''atan''' x |= Syntax


'''x:''' [[Number]]
|p1= x: [[Number]] |= Parameter 1


'''Type of returned value:'''
| [[Number]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>atan 1</pre>


[[Number]]
returns 45 |= Example 1
____________________________________________________________________________________________


'''Description:'''
| [[atan2]], [[tan]] |= See also


Arctangens of '''x''', result in degrees.
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Example:'''
<!-- Note Section END -->
</dl>


_angle = '''atan''' 1 ..........Result is 45
<h3 style="display:none">Bottom Section</h3>


 
[[Category:Scripting Commands|ATAN]]
'''Notes:'''<br>
[[Category:Scripting Commands OFP 1.96|ATAN]]
Using '''atan''' x is fine if you can be certain that x is a finite number.
[[Category:Scripting Commands OFP 1.46|ATAN]]
 
[[Category:Scripting Commands ArmA|ATAN]]
For example:<br>
_angle = '''atan''' 1/0<br>
will create a divide by zero error, even though the angle is 90.<br>
Better to use [[atan2]]

Revision as of 22:05, 1 August 2006

Hover & click on the images for description

Description

Description:
Arctangens of a number, result in degrees.
Groups:
Uncategorised

Syntax

Syntax:
atan x
Parameters:
x: Number
Return Value:
Number

Examples

Example 1:
atan 1
returns 45

Additional Information

See also:
atan2tan

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section