Difference between revisions of "MC-Basic:ATAN2"

From SoftMC-Wiki
Jump to: navigation, search
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:ATAN2}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 4: Line 5:
  
 
|SYNTAX=
 
|SYNTAX=
Atan2(''<expression>, <expression>'')
+
Atan2(<''expression''>, <''expression''>)
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 10: Line 11:
  
 
|DESCRIPTION=
 
|DESCRIPTION=
ATAN2 is used when it is necessary to know not only the absolute value of the angle, but also the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range <br>
+
ATAN2 is used when it is necessary to know both the absolute value of the angle and the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range ±π radians.
+/- p radians.
 
  
 
|TYPE=
 
|TYPE=
Line 17: Line 17:
  
 
|RANGE=
 
|RANGE=
+/- MaxDouble
+
± MaxDouble
  
 
|UNITS=
 
|UNITS=
Line 29: Line 29:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Read-Only
+
Read only
  
 
|EXAMPLE=
 
|EXAMPLE=
?Atan2(1, -1)                                              ‘returns 0.75*p<br>
+
?Atan2(1, -1)  
 
+
::returns 0.75×π<br>
?Atan2(-1, 1)                                              ‘returns -0.25*p
+
 
+
?Atan2(-1, 1)
 +
::returns -0.25×π
 +
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:ATN|ATN]]
+
* [[MC-Basic:ATN|ATN]]
* [[Axystems:MC-Basic:TAN|TAN]]
+
* [[MC-Basic:TAN|TAN]]
  
[[Category:Axystems:MC-Basic:Arithmetic Functions|ATAN]]
+
[[Category:MC-Basic:Arithmetic Functions|ATAN2]]
  
 
}}
 
}}

Latest revision as of 05:32, 17 April 2017

Language: English  • 中文(简体)‎

ATAN2 is used when it is necessary to know both the absolute value of the angle and the quadrant. The first expression is the value on the y axis and the second is the value on the x axis. The result gives the real angle in the range ±π radians.

Syntax

Atan2(<expression>, <expression>)

Availability

All versions

Type

Double

Range

± MaxDouble

Scope

Configuration, Task or Terminal

Limitations

Read only

Examples

?Atan2(1, -1)

returns 0.75×π

?Atan2(-1, 1)

returns -0.25×π

See Also