LlAcos - Second Life Wiki

LlAcos

From Second Life Wiki

Jump to: navigation, search

Contents

Summary

Function: float llAcos( float val );

Returns a float that is the arccosine in radians of val

• float val must fall in the range [-1.0, 1.0]

The returned value is in the range [0.0, PI][1]

Examples

//  This example exercises the full valid range of argument from -1.0 to +1.0
 
default
{
    touch_start(integer num_detected)
    {
        float random = llFrand(2.0) - 1.0;
 
        llOwnerSay("The arccosine of " + (string)random + " is " + (string)llAcos(random));
    }
}

See Also

Functions

• llSin llAsin sine & inverse Sine
• llCos cosine
• llTan llAtan2 tangent & inverse tangent

Articles

•  Wikipedia:Inverse trigonometric function

Deep Notes

Search JIRA for related Issues

Footnotes

  1. ^ The ranges in this article are written in Interval Notation.
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.