From WikiChip
Difference between revisions of "mirc/identifiers/$acos"
(→Example) |
Maroonbells (talk | contribs) (fixed/added examples, added see also's) |
||
Line 4: | Line 4: | ||
<pre>$acos(N)[.deg]</pre> | <pre>$acos(N)[.deg]</pre> | ||
− | == | + | == Parameters == |
− | <span style="display: inline-block; width: 50px;">'''N'''</span>The | + | <span style="display: inline-block; width: 50px;">'''N'''</span>The cosine in radians for which you want the arc cosine. |
== Properties == | == Properties == | ||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
− | <source lang="mIRC">//echo -a $acos(5)</source> | + | |
+ | <source lang="mIRC">//echo -a $acos(5) | ||
+ | ; returns $null because cosine can only be in range of -1.0 through +1.0 | ||
+ | </source> | ||
+ | |||
+ | For the range | ||
+ | |||
+ | <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 36: | ||
== See Also == | == See Also == | ||
− | {{mIRC|$cos}} | + | * {{mIRC|$cos}} |
− | {{mIRC|$sin}} | + | * {{mIRC|$cosh}} |
− | {{mIRC|$tan}} | + | * {{mIRC|$sin}} |
− | {{mIRC|$ | + | * {{mIRC|$asin}} |
− | {{mIRC|$ | + | * {{mIRC|$sinh}} |
− | [[ | + | * {{mIRC|$tan}} |
+ | * {{mIRC|$atan}} | ||
+ | * {{mIRC|$atan2}} | ||
+ | * {{mIRC|$tanh}} | ||
+ | * [[List of identifiers - mIRC]] | ||
+ | {{mIRC identifier list}} |
Revision as of 23:04, 13 June 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$acos return the arccosine of N.
Synopsis
$acos(N)[.deg]
Parameters
NThe cosine in radians for which you want the arc cosine.
Properties
.degReturns the angle as degrees, default is radians.
Example
//echo -a $acos(5) ; returns $null because cosine can only be in range of -1.0 through +1.0
For the range
//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
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
mIRC identifier list