From WikiChip
Difference between revisions of "mirc/identifiers/$atan2"
Maroonbells (talk | contribs) m |
m |
||
Line 2: | Line 2: | ||
== Synopsis == | == Synopsis == | ||
− | <pre>$ | + | <pre>$atan2(<O>,<A>)[.deg]</pre> |
== Parameters == | == Parameters == | ||
− | |||
<span style="display: inline-block; width: 50px;">'''O'''</span>The length of the Opposite side of the right triangle.<br /> | <span style="display: inline-block; width: 50px;">'''O'''</span>The length of the Opposite side of the right triangle.<br /> | ||
<span style="display: inline-block; width: 50px;">'''A'''</span>The length of the Adjacent side of the right triangle.<br /> | <span style="display: inline-block; width: 50px;">'''A'''</span>The length of the Adjacent side of the right triangle.<br /> | ||
== Properties == | == Properties == | ||
− | |||
<span style="display: inline-block; width: 80px;">'''.deg'''</span>Returns the angle as degrees, default is radians. | <span style="display: inline-block; width: 80px;">'''.deg'''</span>Returns the angle as degrees, default is radians. | ||
== Example == | == Example == | ||
− | |||
<source lang="mIRC">//echo -a In right triangle where adjacent side is 3 and opposite side is 4, angle is $atan2( 3 , 4 ).deg degrees | <source lang="mIRC">//echo -a In right triangle where adjacent side is 3 and opposite side is 4, angle is $atan2( 3 , 4 ).deg degrees | ||
; Returns: In right triangle where adjacent side is 3 and opposite side is 4, angle is 36.869898 degrees | ; Returns: In right triangle where adjacent side is 3 and opposite side is 4, angle is 36.869898 degrees | ||
Line 27: | Line 24: | ||
{{mIRC compatibility|7.33}} | {{mIRC compatibility|7.33}} | ||
− | == See | + | == See also == |
* {{mIRC|$cos}} | * {{mIRC|$cos}} | ||
* {{mIRC|$acos}} | * {{mIRC|$acos}} | ||
Line 36: | Line 33: | ||
* {{mIRC|$tan}} | * {{mIRC|$tan}} | ||
* {{mIRC|$atan}} | * {{mIRC|$atan}} | ||
− | |||
* {{mIRC|$tanh}} | * {{mIRC|$tanh}} | ||
* [[List of identifiers - mIRC]] | * [[List of identifiers - mIRC]] | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
+ | [[Category:mIRC identifiers|atan2]] |
Revision as of 06:11, 21 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$atan2 returns the arctangent of the 2 short sides of a right triangle.
Synopsis
$atan2(<O>,<A>)[.deg]
Parameters
OThe length of the Opposite side of the right triangle.
AThe length of the Adjacent side of the right triangle.
Properties
.degReturns the angle as degrees, default is radians.
Example
//echo -a In right triangle where adjacent side is 3 and opposite side is 4, angle is $atan2( 3 , 4 ).deg degrees ; Returns: In right triangle where adjacent side is 3 and opposite side is 4, angle is 36.869898 degrees
//var %opposite 3 | var %adjacent 4 | echo -a $atan2(%opposite,%adjacent) is the same as $atan( $calc( %opposite / %adjacent ) ) ; ATAN2 accepts the side lengths while ATAN accepts the tangent ratio of those sides
Compatibility
Added: mIRC v7.33
Added on: 27 May 2014
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC identifier list