---
title: "trunc"
canonical: "https://support.appfire.com/space/PSJ/15481454/trunc"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | trunc(number, digits) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Truncates a number to a specified precision.

Truncates a number to a specified precision.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| number | Number | Yes | Number to truncate. |
| digits | Number | Yes | Precision. |

## Return Type

**Number**

## Example

```
number a = trunc(1.1578212823495777, 3);
print("a= " + a);
```

Prints: a= 1.157;

## See also

> Macro (contentbylabel)