> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/data-logic/mathmetical-operations/trigonometry.md).

# Trigonometry

This function block performs common trigonometric operations using degrees and simple ratios. It is ideal for converting angles to ratio values (sine/tangent) or converting ratios back to angles (inverse sine/arc-tangent) for measurement and geometry tasks.

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

`Number` Provide a numeric value. For direct functions (`Sin`, `Tan`) give an angle in degrees. For inverse functions (`Asin`, `Atan`) give a ratio value (range depends on the function).

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

`Number` The numeric result of the selected trigonometric operation. Output for inverse operations is in degrees.

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

`Method` Choose the trigonometric operation to apply. Available choices typically include `Sin`, `Asin`, `Tan`, and `Atan`.

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

* Easy selection between direct and inverse trigonometric functions via a simple dropdown.
* Accepts a single numeric input and returns a single numeric output.
* Uses degrees for angle inputs and outputs to remain intuitive for non-technical users.

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

When the block runs it applies the selected operation to the value you provide:

* For `Sin` and `Tan`: the block treats the input as degrees, converts internally to the correct internal representation, and returns the resulting ratio value.
* For `Asin` and `Atan`: the block treats the input as a ratio and returns the corresponding angle in degrees.

This allows you to switch between converting an angle into a ratio (useful for projecting lengths or computing components) and converting measured ratios back into angles for reporting or control logic.

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

1. Feed a numeric value into the `Number` input.
2. Select the desired operation via the `Method` control.
3. Read the result from the `Number` output.

* For angle-to-ratio conversions use `Sin` or `Tan`.
* For ratio-to-angle conversions use `Asin` or `Atan`.

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

* Use `Measure Position Distance` to get X and Y distances between two points, then use `Divide` to produce a ratio and `Atan` to compute the angle between them.
* To compute a hypotenuse from side lengths, combine `Square Root` and `Add` (after squaring components with `Multiply`) and then use `Asin` or `Atan` as needed to get angles.
* Pair with `Round` to present human-friendly angle values (e.g., round to 1 or 2 decimals).
* Use `Absolute` before inverse functions when you only care about the magnitude of a ratio.
* Combine with `Line Geometry` when working with drawn lines: use this block to convert between measured ratios and angles for annotations or downstream logic.

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

* If results look unexpectedly large or small, check whether you should provide an angle (degrees) or a ratio to the `Number` input depending on the selected `Method`.
* For inverse functions ensure input ratios are within valid ranges (e.g., values outside the valid domain for `Asin` will not produce meaningful angles).
