# `CauldronGPU.Quat`
[🔗](https://github.com/jaman/cauldron/blob/v0.3.3/cauldron_gpu/lib/cauldron_gpu/quat.ex#L1)

Rotations as unit quaternions `{x, y, z, w}`, in the renderer's frame: right-handed,
+Y up, the camera looking down -Z.

    CauldronGPU.Quat.yaw_pitch(:math.pi() / 2, -0.2)

# `t`

```elixir
@type t() :: {float(), float(), float(), float()}
```

# `vec3`

```elixir
@type vec3() :: {number(), number(), number()}
```

# `axis_angle`

```elixir
@spec axis_angle(vec3(), number()) :: t()
```

A rotation of `angle` radians about `axis` (any length but zero).

# `identity`

```elixir
@spec identity() :: t()
```

No rotation.

# `multiply`

```elixir
@spec multiply(t(), t()) :: t()
```

The rotation `a` applied after `b`.

# `rotate`

```elixir
@spec rotate(t(), vec3()) :: {float(), float(), float()}
```

`vector` turned by `rotation`.

# `yaw_pitch`

```elixir
@spec yaw_pitch(number(), number()) :: t()
```

Turn `yaw` radians about +Y, then tilt `pitch` radians about the turned +X.

---

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