mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
@@ -1,22 +0,0 @@
|
||||
---
|
||||
page_title: abs - Functions - Configuration Language
|
||||
description: The abs function returns the absolute value of the given number.
|
||||
sidebar_title: abs
|
||||
---
|
||||
|
||||
# `abs` Function
|
||||
|
||||
`abs` returns the absolute value of the given number. In other words, if the
|
||||
number is zero or positive then it is returned as-is, but if it is negative
|
||||
then it is multiplied by -1 to make it positive before returning it.
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
> abs(23)
|
||||
23
|
||||
> abs(0)
|
||||
0
|
||||
> abs(-12.4)
|
||||
12.4
|
||||
```
|
||||
Reference in New Issue
Block a user