# llSin

*LSL function*

```lsl
float float llSin(float theta);
```

- `float theta`: Angle in radians.

- Returns: `float`
- Energy: 10

Returns the sine of theta. Theta is in radians.

Returns a [float](https://wiki.secondlife.com/wiki/float) that is the sine of **theta**.

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

## Caveats

Because of IEE754 on floats , `llSin(PI)` returns -8.742278E-8 ( hex : 0xB3BBBD2E ) and not 0.0 . The error is cumulative with multiples of [PI](/constants/PI/) : For instance `llSin(100000.0*PI)` = 0.015890 when the result should be 0.0

## Examples

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

```lsl
// Touch the object with this script in it to see the sine of random numbers!
default
{
    touch_start(integer num)
    {
        float r = llFrand(TWO_PI);
        llOwnerSay("The sine of " + (string)r + " in radians or " + (string)(r * RAD_TO_DEG) + " in degrees is " + (string)llSin(r));
    }
}
```

</details>

## See also

### Functions

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

---

*Source: [LlSin](https://wiki.secondlife.com/wiki/LlSin) on the Second Life Wiki. Content from the Second Life Wiki articles LlSin (revision 1197477, 2015-09-14) and Template:LSL Function/angle (revision 1169077, 2012-06-13), CC BY-SA 3.0.*

---

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