# llAsin

*LSL function*

```lsl
float float llAsin(float val);
```

- `float val`: A number in the range [-1.0, 1.0].

- Returns: `float`
- Energy: 10

The returned value is in the range \[-[PI_BY_TWO](/constants/PI_BY_TWO/), [PI_BY_TWO](/constants/PI_BY_TWO/)\], or NaN signifying a complex result when the parameter is out of range.

Returns a [float](https://wiki.secondlife.com/wiki/float) that is the arcsine in [radians](https://wiki.secondlife.com/wiki/radians) of **val**

```lsl title="How to use" frame="terminal"
float result = llAsin(0.0);
```

## Caveats

- Triggers a [Math Error](https://wiki.secondlife.com/wiki/Category:LSL_Error/Math) for complex results if not compiled in Mono.

## Examples

<details open>
<summary>Example 1</summary>

```lsl
// Touch the object with this script in it to see the arcsine of random numbers!
default
{
    touch_start(integer num)
    {
        float r = llFrand(2) - 1.0;
        llOwnerSay("The arcsine of " + (string)r + " is " + (string)llAsin(r));
    }
}
```

</details>

## See also

### Functions

- [llSin](/functions/llSin/) — sine
- [llCos](/functions/llCos/) — [llAcos](/functions/llAcos/) — cosine & inverse cosine
- [llTan](/functions/llTan/) — [llAtan2](/functions/llAtan2/) — tangent & inverse tangent

### Articles

- [Inverse trigonometric function](https://en.wikipedia.org/wiki/Inverse_trigonometric_function)

---

*Source: [LlAsin](https://wiki.secondlife.com/wiki/LlAsin) on the Second Life Wiki. Content from the Second Life Wiki article LlAsin (revision 1216697, 2024-05-21), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llAsin/
