View Source Vx.Float (Vx v0.1.0)
The Float type.
Summary
Types
@opaque t()
The float type.
Functions
@spec t() :: t()
Builds a new Float type.
Examples
iex> Vx.Float.t() |> Vx.validate!(1.0)
:ok
iex> Vx.Float.t() |> Vx.validate!(1)
** (Vx.Error) must be a float
iex> Vx.Float.t() |> Vx.validate!("foo")
** (Vx.Error) must be a float