Abs

From Xojo Documentation
Jump to: navigation, search
Method

Abs(v as Double) As Double

Returns the absolute value of a number.

Syntax

result = Abs(value)

Part Type Description
result Double The absolute value of value.
value Double The number to convert to an absolute value.

Notes

The Abs function returns the positive equivalent of the value specified.

Examples

These examples use the Abs function to return the absolute values of the numbers specified.

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

See Also

Sign function, Xojo.Math.Abs method.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About