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 10 double round(double arg) 11 { 12 if (arg < 0.0) 13 return ceil(arg - 0.5); 14 else 15 return floor(arg + 0.5); 16 } 17