X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fmath%2Fnearbyint.c;h=3937dbebb37d6890606e0f5129a08bd0f106290c;hp=675951d73936a3dc33ca375ddf27dd1f8d5af759;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/math/nearbyint.c b/functions/math/nearbyint.c index 675951d..3937dbe 100644 --- a/functions/math/nearbyint.c +++ b/functions/math/nearbyint.c @@ -1,19 +1,17 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ -// ---------------------------------------------------------------------------- -// C++ - -float nearbyint( float x ) { /* TODO */ }; -long double nearbyint( long double x ) { /* TODO */ }; +double nearbyint( double x ) { /* TODO */ }; -// ---------------------------------------------------------------------------- -// Standard C +/* Therx code +{ + return round( x ); +} +*/ -double nearbyint( double x ) { /* TODO */ }; float nearbyintf( float x ) { /* TODO */ }; long double nearbyintl( long double x ) { /* TODO */ };