atan: Difference between revisions

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

Revision as of 19:41, 1 June 2006


atan x


Operand types:

x: Number

Type of returned value:

Number

Description:

Arctangens of x, result in degrees.


Example:

_angle = atan 1 ..........Result is 45


Notes:
Using atan x is fine if you can be certain that x is a finite number.

For example:
_angle = atan 1/0
will create a divide by zero error, even though the angle is 90.
Better to use atan2