# `float` (parameter type)

Float parameters are specified with `type="float"` in the parameter definition:

>         {name="MyFloat1", type="float", default=8.4},
>         {name="MyFloat2", type="float", default=8.4, range={0,11.2}},
>         {name="MyFloat3", type="float", default=8.4, range={0,11.2}, ui={style="slider"}},
>         {name="MyFloat4", type="float", default=8.4, range={0,11.2}, ui={style="slider", unit="mm"}}

Float parameters are represented by a spinner or slider with an edit field in the tool panel:

The current value of a float parameter is accessed via `self.parameters` in `execute`, which provides a Lua `number`:

>       local myFloat1 = self.parameters.MyFloat1

See also

- float (result type)