[CRT] Add round and roundf and add it to msvcrtex to make clang v14 happy

This commit is contained in:
Timo Kreuzer 2022-07-15 18:51:20 +02:00
parent 83faa2da5e
commit bc9409daba
4 changed files with 37 additions and 0 deletions

16
sdk/lib/crt/math/roundf.c Normal file
View file

@ -0,0 +1,16 @@
/*
* COPYRIGHT: BSD - See COPYING.ARM in the top level directory
* PROJECT: ReactOS CRT library
* PURPOSE: Portable implementation of roundf
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
*/
#include <math.h>
float roundf(float arg)
{
if (arg < 0.0)
return ceilf(arg - 0.5);
else
return floorf(arg + 0.5);
}