# `Croma.SubtypeOfFloat`
[🔗](https://github.com/skirino/croma/blob/main/lib/croma/subtype.ex#L79)

Helper module to define float-based types.
The following members are generated by `use Croma.SubtypeOfFloat`:

- `@type t`
- `@spec valid?(term) :: boolean`

Options:
- `:min` - Minimum value of this type (inclusive).
- `:max` - Maximum value of this type (inclusive).
- `:default` - Default value for this type. Passing this option generates `default/0`.

## Examples
    defmodule MyFloat do
      use Croma.SubtypeOfFloat, min: 0.0, max: 5.0, default: 0.0
    end

---

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