From WikiChip
Difference between revisions of "mirc/identifiers/$acos"
(Created page with "{{mirc title|$acos Identifier}}'''$acos''' return the arccosine of N. == Synopsis == <pre>$acos(N)[.deg]</pre> == Paramters == <span style="display: inline-block; width: 50...") |
m |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$acos Identifier}}'''$acos''' | + | {{mirc title|$acos Identifier}}'''$acos''' returns the arccosine of N. |
+ | |||
== Synopsis == | == Synopsis == | ||
<pre>$acos(N)[.deg]</pre> | <pre>$acos(N)[.deg]</pre> | ||
− | == | + | == Parameters == |
− | + | <span style="display: inline-block; width: 50px;">'''N'''</span>The cosine in radians for which you want the arc cosine. | |
− | <span style="display: inline-block; width: 50px;">'''N'''</span>The | ||
== 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 $ | + | <source lang="mIRC">//echo -a $acos(5) |
+ | ; returns $null because cosine can only be in range of -1.0 through +1.0 | ||
+ | </source> | ||
+ | |||
+ | <source lang="mIRC">//echo -a In right triangle where opposite side is 4 and hypotenuse is 5, angle is $acos( $calc(4/5) ).deg degrees | ||
+ | ; Returns: In right triangle where opposite side is 4 and hypotenuse is 5, angle is 36.869898 degrees | ||
+ | </source> | ||
+ | |||
+ | <source lang="mIRC"> | ||
+ | //var %i 60 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg | ||
+ | //var %i 45 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg | ||
+ | ; returns 44.999982 instead of 45 because the $cos fraction is limited to 6 places | ||
+ | //var %i 270 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg | ||
+ | ; returns angle in the range of 0-180 degrees (0-pi radians) | ||
+ | </source> | ||
== Compatibility == | == Compatibility == | ||
Line 19: | Line 32: | ||
== See Also == | == See Also == | ||
− | {{mIRC|$cos}} | + | * {{mIRC|$cos}} |
− | {{mIRC|$sin}} | + | * {{mIRC|$cosh}} |
− | {{mIRC|$tan}} | + | * {{mIRC|$sin}} |
− | {{mIRC|$ | + | * {{mIRC|$asin}} |
− | {{mIRC|$ | + | * {{mIRC|$sinh}} |
− | [[Category: | + | * {{mIRC|$tan}} |
+ | * {{mIRC|$atan}} | ||
+ | * {{mIRC|$atan2}} | ||
+ | * {{mIRC|$tanh}} | ||
+ | * [[List of identifiers - mIRC]] | ||
+ | {{mIRC identifier list}} | ||
+ | [[Category:mIRC identifiers|acos]] |
Latest revision as of 06:03, 21 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$acos returns the arccosine of N.
Synopsis[edit]
$acos(N)[.deg]
Parameters[edit]
NThe cosine in radians for which you want the arc cosine.
Properties[edit]
.degReturns the angle as degrees, default is radians.
Example[edit]
//echo -a $acos(5) ; returns $null because cosine can only be in range of -1.0 through +1.0
//echo -a In right triangle where opposite side is 4 and hypotenuse is 5, angle is $acos( $calc(4/5) ).deg degrees ; Returns: In right triangle where opposite side is 4 and hypotenuse is 5, angle is 36.869898 degrees
//var %i 60 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg //var %i 45 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg ; returns 44.999982 instead of 45 because the $cos fraction is limited to 6 places //var %i 270 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg ; returns angle in the range of 0-180 degrees (0-pi radians)
Compatibility[edit]
Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See Also[edit]
mIRC identifier list