# `QuakeServer.Angles`
[🔗](https://github.com/jaman/quake_server/blob/v0.1.0/lib/quake_server/angles.ex#L1)

Angles as FTE's server reads them: `{pitch, yaw, roll}` in degrees, pitch above zero
looking down.

    QuakeServer.Angles.vectors({0.0, 90.0, 0.0})
    #=> {forward, right, up}

# `mod`

```elixir
@spec mod(number()) :: float()
```

An angle brought into 0 up to 360 degrees.

# `of`

```elixir
@spec of({number(), number(), number()}) :: {float(), float(), float()}
```

The `{pitch, yaw, 0}` of direction `vector` in whole degrees, pitch above zero looking up.

# `vectoangles`

```elixir
@spec vectoangles(
  {number(), number(), number()},
  {number(), number(), number()} | nil,
  {number(), number()}
) :: {float(), float(), float()}
```

The `{pitch, yaw, roll}` of direction `forward`, as FTE's `vectoangles` gives them
(`VectorAngles`): fractions of a degree kept, each angle 0 up to 360. The roll comes
from `up` when one is given, else it is 0; with no horizontal part the yaw comes from
`up`, or is 0. Pitch is scaled by `mesh_pitch` and roll by `mesh_roll` (the values
of `r_meshpitch` and `r_meshroll`, 1 or -1).

    QuakeServer.Angles.vectoangles({1.0, 0.36, 0.0}, nil, {-1.0, 1.0})
    #=> {0.0, 19.798876354524932, 0.0}

# `vectors`

```elixir
@spec vectors({number(), number(), number()}) :: {tuple(), tuple(), tuple()}
```

The forward, right and up directions of `angles`, as FTE's `AngleVectors` gives them.

# `yaw`

```elixir
@spec yaw({number(), number(), number()}) :: float()
```

The yaw of direction `{x, y, _}` in whole degrees (the fraction cut off), 0 up to 360, as FTE's `vectoyaw` and Half-Life's `VEC_TO_YAW` give it.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
