From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Xojo.Math.Abs(alue As Double) As Double

Supported for all project types and targets.

Returns the absolute value of a number.

Sample Code

Get the absolute values:

Using Xojo.Math

Dim d As Double
d = Abs(23.9) // returns 23.9
d = Abs(-23.9) // returns 23.9