# `intrange` (threshold type)

Thresholds with `type="intrange"` enable a customizable interval outside which an int result is considered invalid.

This is an example definition:

>         {name="NumThings", type="intrange", range={0, 1000}, default={200, 800}}

This is how it appears in the result section of the tool panel. The threshold is indicated with a slider with two handles for setting the threshold and the value of the result with the same name as the threshold is indicated in the same control:

The current values of an `intrange`-threshold are accessed via `self.thresholds` in `execute`, which provides a `Threshold` instance. To base the overall result of the tool on the threshold a value for Pass needs to be set in the output:

>       local numThings = countThings() -- some computation
>       output:add("Pass", self.thresholds.NumThings:contains(numThings))

See also

- floatrange (threshold type) corresponding type for floating point values