From WikiChip
Difference between revisions of "mirc/identifiers/$acos"
Maroonbells (talk | contribs) (fixed/added examples, added see also's) |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$acos Identifier}}'''$acos''' | + | {{mirc title|$acos Identifier}}'''$acos''' returns the arccosine of N. |
+ | |||
== Synopsis == | == Synopsis == | ||
Line 5: | Line 6: | ||
== Parameters == | == 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 cosine in radians for which you want the arc cosine. | ||
== 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 $acos(5) | <source lang="mIRC">//echo -a $acos(5) | ||
; returns $null because cosine can only be in range of -1.0 through +1.0 | ; returns $null because cosine can only be in range of -1.0 through +1.0 | ||
</source> | </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 | <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 | ||
Line 47: | Line 43: | ||
* [[List of identifiers - mIRC]] | * [[List of identifiers - mIRC]] | ||
{{mIRC identifier list}} | {{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