acos()

 
Returns the arccosine of number. The results are returned in radians.
Syntax
acos( number )
User Annotations: acos
Ray Yates : mivascript at, pcinet d0t com
02/09/2012 11:07 a.m.
A bug in acos(x) causes it to return cos(x). This is true through version 5.14. The derivitive function below was provided by Jon Burchmore and returns the correct value.
<MvFUNCTION NAME = "arccos" PARAMETERS = "val" STANDARDOUTPUTLEVEL = "">
   <MvASSIGN NAME = "l.negval" VALUE = "{ 0 - l.val }">
   <MvFUNCTIONRETURN VALUE = "{ atan( l.negval / sqrt( l.negval * l.val + 1 ) ) + 2 * atan( 1 ) }">
</MvFUNCTION>