ReactOS 0.4.16-dev-2104-gb84fa49
round.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: BSD - See COPYING.ARM in the top level directory
3 * PROJECT: ReactOS CRT library
4 * PURPOSE: Portable implementation of round
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8#include <math.h>
9
10double round(double arg)
11{
12 if (arg < 0.0)
13 return ceil(arg - 0.5);
14 else
15 return floor(arg + 0.5);
16}
_ACRTIMP double __cdecl ceil(double)
Definition: ceil.c:18
_ACRTIMP double __cdecl floor(double)
Definition: floor.c:18
#define round(x)
Definition: opentype.c:47