# Minimum

This function block calculates the minimum value from a list of inputs and identifies the index of that minimum value. It dynamically adjusts the number of input sockets based on user selection, making it flexible for various amounts of input data.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Generic` This input accepts any type of numerical data. The number of inputs can be dynamically adjusted by the user.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Generic` The minimum value obtained from the given inputs.

`Index` The index of the minimum value found within the provided inputs.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Input Size` A dropdown menu that allows you to select how many input sockets you want available, ranging from 2 to 20. The number of sockets adjusts automatically based on your selection.

## 🎨 Features <a href="#features" id="features"></a>

`Dynamic Input Handling` The block can adjust the number of input connections based on user preference, making it adaptable to different use cases.

`Real-time Minimum Calculation` As values are provided through the input sockets, the block continuously calculates and outputs the minimum value and its index.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. **Select Input Size**: Choose the desired number of input sockets using the `Input Size` dropdown.
2. **Provide Inputs**: Connect numerical data to the input sockets that appear based on your selection.
3. **Evaluate Minimum**: The block will automatically compute and output the minimum value and its index when all input connections are made.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When executed, this function block identifies the smallest number from the connected inputs and returns both that number and its location within the array of inputs.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

<details>

<summary>Dynamic Sizing</summary>

You can adjust the number of input sockets at any time. Make sure to provide values before evaluating to see the result of the minimum calculation.

</details>

<details>

<summary>Batch Processing</summary>

If you’re providing multiple batches of inputs, ensure that the input types remain consistent to avoid errors.

</details>

<details>

<summary>Using with Other Functions</summary>

This block works well with the `Add`, `Subtract`, `Multiply`, and `Divide` function blocks to first process data before finding the minimum.

</details>

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>No Output</summary>

If you don't see any output when evaluating, ensure that connections are properly made and that you have provided numerical values in the input sockets.

</details>

<details>

<summary>Invalid Input Types</summary>

Ensure the data supplied to the inputs are numerical. The function block expects valid numbers to perform calculations.

</details>
