Hide minor edits - Show changes to output

April 03, 2015, at 10:02 AM
by

- Changed line 21 from:

[@

to:

(:source lang=arduino tabwidth=4:)

Changed lines 24-29 from:

a++; // use this instead -

abs(a); // keep other math outside the function

@]

abs(a); // keep other math outside the function

@]

to:

abs(a);

a++; // use this instead - keep other math outside the function

(:sourceend:)

a++; // use this instead - keep other math outside the function

(:sourceend:)

February 06, 2010, at 09:26 AM
by

- Changed lines 29-32 from:

!!!!See also

* [[Mathh|math.h]]

* [[Mathh|math.h]]

to:

February 06, 2010, at 02:51 AM
by

- Added lines 28-32:

!!!!See also

* [[Mathh|math.h]]

January 27, 2009, at 12:26 PM
by

- Changed lines 22-25 from:

abs(a - 100, 0); // avoid this - yields incorrect results

a -= 100; // use this instead -

abs(a, 100); // keep other math outside the function

a -= 100; // use this instead -

abs(a, 100); // keep other math outside the function

to:

abs(a++); // avoid this - yields incorrect results

a++; // use this instead -

abs(a); // keep other math outside the function

a++; // use this instead -

abs(a); // keep other math outside the function

January 27, 2009, at 06:56 AM
by

- Changed lines 19-20 from:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

to:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results.

January 27, 2009, at 06:56 AM
by

- January 27, 2009, at 06:55 AM
by

- Changed lines 19-20 from:

Because of the way the max() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

to:

Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

January 27, 2009, at 06:55 AM
by

- Added lines 17-27:

!!!!Warning

Because of the way the max() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results

[@

abs(a - 100, 0); // avoid this - yields incorrect results

a -= 100; // use this instead -

abs(a, 100); // keep other math outside the function

@]

April 16, 2007, at 06:07 PM
by

- Deleted line 16:

[[HomePage | Reference Home]]

December 02, 2006, at 06:59 PM
by

- Added lines 1-17:

!!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.

[[HomePage | Reference Home]]

!!!!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.

[[HomePage | Reference Home]]