# `Monty.Frameworks.Actions.ActionSamplers.UniformlyDistributedSampler`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/frameworks/actions/action_samplers/uniformly_distributed_sampler.ex#L1)

Makes actions whose parameters are drawn uniformly from configured ranges.

Mirrors `tbp/monty/frameworks/actions/action_samplers.py::UniformlyDistributedSampler`.
Turning actions draw their degrees from `:min_rotation_degrees`..
`:max_rotation_degrees`, moving actions their distance from
`:min_translation`..`:max_translation`, and the actions that name an absolute
angle — pitch, yaw — from `:min_absolute_degrees`..`:max_absolute_degrees`.

Monty's default for `:min_translation` and `:max_translation` is the same
value, so a default-constructed sampler moves a fixed 5 cm and only the
turning is random. That looks like an oversight and is reproduced: an
experiment that wants random distances has to say so.

## The quaternion

`random_quaternion_wxyz/1` is Monty's own construction — two half-angles drawn
from three uniforms, arranged as `(w, x, y, z)` — not numpy's, so the numbers
differ from any other uniform-quaternion routine. It is reproduced component
for component, including the order the three draws are made in, because the
stream is what a sampler's caller shares.

# `t`

```elixir
@type t() :: %Monty.Frameworks.Actions.ActionSamplers.UniformlyDistributedSampler{
  actions: [module()],
  max_absolute_degrees: float(),
  max_rotation_degrees: float(),
  max_translation: float(),
  min_absolute_degrees: float(),
  min_rotation_degrees: float(),
  min_translation: float()
}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

A sampler that draws its parameters from the configured ranges.

---

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