# `Curves.Bezier.Predefined`
[🔗](https://github.com/greetingsfellowhumans/curves/blob/main/lib/curves/bezier/predefined.ex#L1)

Shortcuts for quickly getting a list of points that can be passed into `Curves.define_bezier/1`

## Usage
```elixir
    iex> alias Curves.Bezier.Predefined
    iex> Predefined.get_coords(:linear_up_right)
    [{0, 0}, {1, 1}]
    iex> [:ease | _] = Predefined.list()
    iex> Predefined.get_coords(:ease_in_out_cubic)
    [{0.0, 0.0}, {0.65, 0.0}, {0.35, 1.0}, {1.0, 1.0}]
```

# `curve_key`

```elixir
@type curve_key() :: atom()
```

The type of curve

# `curve_keys`

```elixir
@type curve_keys() :: [curve_key()]
```

A list of curve keys

# `curve_type_info`

```elixir
@type curve_type_info() :: %{
  order: Curves.Utils.Types.order(),
  key: curve_key(),
  points: Curves.Utils.Types.point_list()
}
```

A map of useful info about a predefined curve.

# `curve_type_infos`

```elixir
@type curve_type_infos() :: [curve_type_info()]
```

A list of curve type info

# `details`

```elixir
@spec details(curve_key()) :: curve_type_info()
```

Return a map with details about a specific curve.

## Examples
    iex> Curves.Bezier.Predefined.details(:linear_up_right)
    %{k: :linear_up_right, points: , order: 1}

# `get`

```elixir
@spec get(curve_key(), Curves.Utils.Types.opts()) :: Curves.Utils.Types.points()
```

Return a tensor of points for a given key.
Mainly for internal use.

# `get_coords`

```elixir
@spec get_coords(curve_key()) :: Curves.Utils.Types.point_list()
```

Return coordinates list for a given key

# `list`

```elixir
@spec list() :: curve_keys()
```

Return a list of all keys that can be used with `get/2`

## Examples
    iex> [:ease | _] = Curves.Bezier.Predefined.list()

# `list`

```elixir
@spec list(Curves.Utils.Types.order()) :: curve_keys()
```

Return a list of all keys, within a given curve order, that can be used with `get/2`
`(linear = 1, quadratic = 2, cubic = 3)`

## Examples
    iex> [:linear | _] = Curves.Bezier.Predefined.list(1)
    iex> [:quadratic_down | _] = Curves.Bezier.Predefined.list(2)

# `list_details`

```elixir
@spec list_details() :: curve_type_info()
```

Return list of all details for all predefined curves

---

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