<div class="meta" robots="noindex">

</div>

Method

# Xojo.Math.Abs

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Abs</api/math/abs>` as a replacement.

</div>

## Description

Returns the absolute value of a number.

## Sample code

Get the absolute values:

``` xojo
Using Xojo.Math

Dim d As Double
d = Abs(23.9) ' returns 23.9
d = Abs(-23.9) ' returns 23.9
```

## Compatibility

All project types on all supported operating systems.
