# NumberRange

## Overview

A data type representing a numeric range defined by two values. This range represents the span between a minimum and maximum value and is used to specify range limits in various numeric settings.

Internally, it uses 32-bit floating point format to store values, so precision may not be fully guaranteed when dealing with extremely large numbers or precise decimal calculations.

## Constructors

### new

Creates a new NumberRange based on the specified minimum and maximum values. When defining a range, the minimum value cannot exceed the maximum value, and if both values are identical, it represents a single-value range. You can clearly define a numeric range allowed.

#### Parameters

| `number` InMin | Specifies the minimum value of the NumberRange. This value represents the start of the range and cannot be greater than the maximum value. |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `number` InMax | Specifies the maximum value of the NumberRange. This value represents the end of the range and cannot be less than the minimum value.      |

#### Return

| `NumberRange` | A NumberRange object created with the specified minimum and maximum value. |
| ------------- | -------------------------------------------------------------------------- |

#### Code Samples

```lua
local NumRange = NumberRange.new(1, 10)
```

## Properties

### Max

`number`

It is the largest number allowed in the NumberRange. To maintain range validity, this value cannot be less than the minimum value.

#### Code Samples

```lua
local NumRange = NumberRange.new(1, 10)
print(NumRange.Max)
```

### Min

`number`

It is the smallest number allowed in the NumberRange. To maintain range validity, this value cannot exceed the maximum value.

#### Code Samples

```lua
local NumRange = NumberRange.new(1, 10)
print(NumRange.Min)
```

## Methods

## Events


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/datatype/numberrange.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
