- Made pciuhci.device and pciehci.device compile again: completed
[AROS.git] / compiler / clib / labs.c
blob4cf1c89477425e18c81ef0efe50c379721fde387
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function labs().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <stdlib.h>
13 long labs (
15 /* SYNOPSIS */
16 long j)
18 /* FUNCTION
19 Compute the absolute value of j.
21 INPUTS
22 j - A signed long
24 RESULT
25 The absolute value of j.
27 NOTES
29 EXAMPLE
30 // returns 1
31 labs (1L);
33 // returns 1
34 labs (-1L);
36 BUGS
38 SEE ALSO
39 abs(), fabs()
41 INTERNALS
43 ******************************************************************************/
45 return (j < 0) ? -j : j;
46 } /* labs */