You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This shows you the differences between two versions of the page.
functions:llacos [2014-05-21 12:45 SLT] sei Force re-caching the page with the NaN changes |
functions:llacos [2015-09-22 11:59 SLT] (current) sei Style |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | $nav | ||
===== Function: llAcos ===== | ===== Function: llAcos ===== | ||
Line 14: | Line 15: | ||
===== Return value ===== | ===== Return value ===== | ||
- | [[types/Float]] number with the angle in radians that is the inverse cosine of the argument. | + | $lty[Float] number with the angle in radians that is the inverse cosine of the argument. |
===== Notes ===== | ===== Notes ===== | ||
- | * The range of **arg** must be between -1 and 1, because the cosine of any angle can't be outside that range. | + | * The range of $prm[arg] must be between -1 and 1, because the cosine of any angle can't be outside that range. |
- | * The result is always between 0 and [[constants/PI]], or **NaN** if the argument is out of the valid range. | + | * The result is always between 0 and $lct[PI], or $nan if the argument is out of the valid range. |
===== Short examples ===== | ===== Short examples ===== | ||
Line 37: | Line 38: | ||
===== Complete examples ===== | ===== Complete examples ===== | ||
- | A [[types/rotation]] can be expressed by an axis and an angle. This example illustrates how to use **llAcos** to obtain the angle component of a rotation, assumed it's normalized (most LSL functions return normalized rotations). If the rotation is not guaranteed to be normalized, use [[llRot2Angle]] instead. | + | A $lty[rotation] can be expressed by an axis and an angle. This example illustrates how to use $fn[llAcos] to obtain the angle component of a rotation, assumed it's normalized (most LSL functions return normalized rotations). If the rotation is not guaranteed to be normalized, use $lfn[llRot2Angle] instead. |
<file lsl2 llAcos-example.lsl> | <file lsl2 llAcos-example.lsl> | ||
Line 52: | Line 53: | ||
===== See also ===== | ===== See also ===== | ||
- | === Related trigonometric functions === | + | * $lfn[llCos] calculates the cosine of the argument. |
- | * [[llCos]] calculates the cosine of the argument. | + | * $lfn[llAsin] calculates the inverse sine of the argument. |
- | * [[llAsin]] calculates the inverse sine of the argument. | + | * $lfn[llSin] calculates the sine of the argument. |
- | + | * $lfn[llAtan2] calculates the angle of a 2D vector. | |
- | === Other trigonometric functions === | + | * $lfn[llTan] calculates the tangent of the argument. |
- | * [[llSin]] calculates the sine of the argument. | + | * Other $lfn[math/] functions. |
- | * [[llAtan2]] calculates the angle of a 2D vector. | + | |
- | * [[llTan]] calculates the tangent of the argument. | + | |