> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/normalang.md).

# npc.normalang

```lua
npc.normalang(angle)
```

|                         |                                                                            |
| ----------------------- | -------------------------------------------------------------------------- |
| id                      | `0x013D`                                                                   |
| arguments               | 1: Float                                                                   |
| result                  | Float: goes to the very next call, or to `npc.lua(npc.normalang(...), fn)` |
| in NPC Kit              | yes                                                                        |
| measured from a kit NPC | returns                                                                    |
| vanilla scripts         | 227 calls in 39 of 1114 scripts                                            |

## What it does

Gives an angle wrapped into -π to π (both ends stay as they are). A result.

## Arguments

### `angle` (Float)

Radians.

## Result

The wrapped angle.

## Timing

Returns at once.

## In NPC Kit

[dir](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/dir.md), [aturn\_261](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aturn_261.md) and [turn\_62](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turn_62.md) wrap the heading themselves; compute angles in Lua when `npc.add` runs.

## Used with

* [dir](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/dir.md), [aturn\_261](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aturn_261.md).

## Example

```lua
local function wrap(a)               -- normalang in Lua
    return (a + math.pi) % (2 * math.pi) - math.pi
end

turnAround = function()
    npc.aturn_261(wrap(1.676 + math.pi));
end,
```
