# llAngleBetween

*LSL function*

```lsl
float float llAngleBetween(rotation start_rot, rotation end_rot);
```

- `rotation start_rot`: Starting rotation.
- `rotation end_rot`: Ending rotation.

- Returns: `float`
- Energy: 10

Returns a [float](https://wiki.secondlife.com/wiki/float) that is the angle in radians between rotation `a` and rotation `b`.

```lsl title="How to use" frame="terminal"
float result = llAngleBetween(ZERO_ROTATION, ZERO_ROTATION);
```

## Examples

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

```lsl
default
{
    touch_start(integer num_detected)
    {
        rotation currentRootRotation = llGetRootRotation();
        float angle = llAngleBetween(ZERO_ROTATION, currentRootRotation);

        // PUBLIC_CHANNEL has the integer value 0
        llSay(PUBLIC_CHANNEL,
            "llAngleBetween(ZERO_ROTATION, " + (string)currentRootRotation + ") = " + (string)angle);
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-2424: type=bug|llAngleBetween() is sometimes inaccurate

## See also

### Functions

- [llRotBetween](/functions/llRotBetween/)
- [llRot2Angle](/functions/llRot2Angle/) — Similar functionality used for the Axis-Angle format

---

*Source: [LlAngleBetween](https://wiki.secondlife.com/wiki/LlAngleBetween) on the Second Life Wiki. Content from the Second Life Wiki articles LlAngleBetween (revision 1194051, 2015-01-22) and Template:Issues/SVC-2424 (revision 400453, 2009-06-21), CC BY-SA 3.0.*

---

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