# `Plushie.Canvas.Angle`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/canvas/angle.ex#L1)

Angle type for canvas rotation and arc parameters.

Accepts degrees by default. Use `{value, :rad}` for explicit radians
or `{value, :deg}` for explicit degrees.

    rotate(45)              # 45 degrees
    rotate({45, :deg})      # same
    rotate({0.785, :rad})   # explicit radians

The renderer receives degrees on the wire. Bare numbers are treated
as degrees (matching the Rust SDK convention). Values are normalized
to degrees at cast time.

When used as a field type, values are normalized to degrees at cast
time. The `to_radians/1` function is available for contexts that
need radian values.

# `t`

```elixir
@type t() :: number() | {number(), :deg} | {number(), :rad}
```

# `to_degrees`

```elixir
@spec to_degrees(t()) :: float()
```

Converts an angle value to degrees.

Accepts bare numbers (already degrees), `{value, :deg}`, or `{value, :rad}`.

# `to_radians`

```elixir
@spec to_radians(t()) :: float()
```

Converts an angle value to radians.

Accepts bare numbers (degrees), `{value, :deg}`, or `{value, :rad}`.

---

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