mirror of
https://github.com/reactos/reactos.git
synced 2024-08-28 14:18:41 +00:00
17 lines
371 B
C
17 lines
371 B
C
![]() |
/*
|
||
|
* COPYRIGHT: BSD - See COPYING.ARM in the top level directory
|
||
|
* PROJECT: ReactOS CRT library
|
||
|
* PURPOSE: Portable implementation of round
|
||
|
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
||
|
*/
|
||
|
|
||
|
#include <math.h>
|
||
|
|
||
|
double round(double arg)
|
||
|
{
|
||
|
if (arg < 0.0)
|
||
|
return ceil(arg - 0.5);
|
||
|
else
|
||
|
return floor(arg + 0.5);
|
||
|
}
|