# Built-in functions

In mathematical expressions, you can use the functions available for any platform.

| Function          | Description                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **time()**        | Returns the time in milliseconds since the program started.                                                                     |
| **sin(angle)**    | The sine of the angle, where "angle" is the angle in degrees.                                                                   |
| **cos(angle)**    | The cosine of the angle, where "angle" is the angle in degrees.                                                                 |
| **ln(a)**         | The logarithm, where "a" is a number.                                                                                           |
| **exp(a)**        | Exponent ("e" in the degree of argument "a").                                                                                   |
| **asin(a)**       | Arcsine, where "a" is a number.                                                                                                 |
| **acos(a)**       | Arccosine, where "a" is a number.                                                                                               |
| **atan(a)**       | Arctangent, where "a" is a number.                                                                                              |
| **atan2(a1, a2)** | The arctangent of a1 / a2 with division check by 0.                                                                             |
| **sgn(a)**        | Sign. Returns 1 if the argument “a” is positive, -1 if it is negative, and 0 if the argument is zero.                           |
| **sqrt(a)**       | The square root of the argument "a". If the argument is negative, the variable will be assigned the value “NaN” (Not A Number). |
| **abs(a)**        | The absolute value of number "a".                                                                                               |
| **ceil(a)**       | Rounds up the passed argument "a" to the nearest integer.                                                                       |
| **floor(a)**      | Rounds down the passed argument "a" to the nearest integer.                                                                     |
| **random(a)**     | A random number between 0 and the passed argument “a”.                                                                          |


---

# 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://help.trikset.com/en/studio/programming-visual/expression-syntax/built-in-functions.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.
