You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

float llAsin(float arg)

Return the inverse sine of the argument, in radians. The inverse sine (also known as arcsine) is the angle whose sine is the given argument.

Number whose inverse sine is to be found.

` Float` number with the angle in radians that is the inverse sine of the argument.

- The range of
`arg`

must be between -1 and 1, because the sine of any angle can't be outside that range. - The result is always between -
and**PI_BY_TWO**`[PI_BY_TWO, or`**NaN**if the argument is out of the valid range.

float angle; angle = llAsin(1); // Sets angle to PI_BY_TWO, because the sine of 1 is PI_BY_TWO. angle = llAsin(0); // Sets angle to 0, because the sine of 0 is 0. angle = llAsin(-1); // Sets angle to -PI_BY_TWO, because the sine of -PI_BY_TWO is -1. angle = llAsin(0.67); // Sets angle to approximately 0.734209 (the sine of that is 0.67) angle = llAsin(2); // Under Mono, sets angle to NaN (Not a Number) // because there's no number whose sine is 2. // Crashes with a math error under LSO.

The following example will output the pitch and roll angles of a prim, in degrees:

default { state_entry() { rotation rot = llGetLocalRot(); vector forward = <1,0,0>*rot; vector right = <0,-1,0>*rot; float pitch = llAsin(forward.z); float roll = llAsin(right.z); llOwnerSay("Pitch=" + (string)(pitch * RAD_TO_DEG) + "°; roll=" + (string)(roll * RAD_TO_DEG) + "°"); } }