Arduino - Abs

Arduino

Guide

Tutorials

Reference

Hardware

Software

Forum

Playground

Exhibition

Hacking

FAQ

Buy

Language | Libraries | Comparison

## abs(x)

#### Description

Computes the absolute value of a number.

#### Parameters

x: the number

#### Returns

x: if x is greater than or equal to 0.

-x: if x is less than 0.

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

Edit Page | Page History | Printable View | Recent Site Changes