mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 15:46:52 +00:00
[CRT] Add round and roundf and add it to msvcrtex to make clang v14 happy
This commit is contained in:
parent
83faa2da5e
commit
bc9409daba
4 changed files with 37 additions and 0 deletions
16
sdk/lib/crt/math/roundf.c
Normal file
16
sdk/lib/crt/math/roundf.c
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue