# Round

This function block rounds a numeric value to a specified number of decimal places. It is a simple numerical utility useful for formatting measurement results, counts, percentages and any numeric outputs prior to display, logging or export.

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

`Number` The numeric value to be rounded. (Socket: Number)

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

`Number` The rounded numeric value. (Socket: Number)

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

`Decimals` Sets how many decimal places the input number will be rounded to. Enter an integer (for example 0, 1, 2).

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

* Simple visual control for selecting decimal precision using a text field.
* Instantly converts any incoming numeric socket value into a nicely formatted numeric value for display, plotting or export.
* Useful to reduce noise in displayed metrics (e.g., shorten long floating point values).

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

1. Provide a numeric value to the `Number` input socket (for example a measurement or a count).
2. Set the desired precision using the `Decimals` control.
3. Read the rounded result from the `Number` output socket and pass it to display, logging or further processing blocks.

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

When evaluated, this function block takes the current numeric input and returns the same value rounded to the number of decimals specified in the `Decimals` control.

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

* When showing statistics from image analysis, round numeric outputs from blocks such as `Mean Value of Image` or `Std. of Image` to make dashboards and reports easier to read.
* Round distance values from `Measure Position Distance` before sending them to displays or logs to avoid overly precise values that are hard to interpret.
* If you want to store compact numeric logs or CSV files, round values before feeding them to `CSV Export` or `Data to JSON`.
* For visual plots, feed rounded numbers into `Scope` to make plotted labels and legends clearer.
* If a detection block returns counts (for example from `Object Detection` or `Object Detection - Custom`), use this block to format numbers for UIs or records.

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

* If the output does not change as expected, check that the `Number` input is receiving a valid numeric value. Use `Is None` or `Replace None` to handle missing inputs before rounding.
* If non-integer values are entered into the `Decimals` control, ensure you provide a valid integer value; otherwise the control may be interpreted in an unexpected way.


---

# 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.augelab.com/function-blocks/data-logic/mathmetical-operations/round.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.
