---
name: "abs"
type: command
status: ok
groups: ["Math"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/abs
revid: 311169
updated: 2022-05-12T09:59:18Z
---

# abs

*Command · Math · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Returns absolute (positive) value of a real number.

## Syntax

```sqf
abs x
```

**Parameters:**

- `x`: [Number](../topics/Number.md)

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
_n = abs -3; // Returns 3
```

## See also

[+](../commands/~2B.md) · [-](../commands/-.md)

<sub>Source: [BI Community Wiki — abs](https://community.bistudio.com/wiki/abs) (revision 311169).</sub>
