X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fmath%2Fround.c;h=b2abcd1f805c588735c8f873ede453db5b7b712c;hb=33ea80a48bfc48263e3cc855e7a4bfef7ebe8d98;hp=bf0a321692496338d832034348477ecd9d3c2c32;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec;p=pdclib diff --git a/functions/math/round.c b/functions/math/round.c index bf0a321..b2abcd1 100644 --- a/functions/math/round.c +++ b/functions/math/round.c @@ -5,19 +5,6 @@ // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- -// C++ - -long long llround( float x ) { /* TODO */ }; -long long llround( long double x ) { /* TODO */ }; -long lround( float x ) { /* TODO */ }; -long lround( long double x ) { /* TODO */ }; -float round( float x ) { /* TODO */ }; -long double round( long double x ) { /* TODO */ }; - -// ---------------------------------------------------------------------------- -// Standard C - long long llround( double x ) { /* TODO */ }; long long llroundf( float x ) { /* TODO */ }; long long llroundl( long double x ) { /* TODO */ }; @@ -25,5 +12,12 @@ long lround( double x ) { /* TODO */ }; long lroundf( float x ) { /* TODO */ }; long lroundl( long double x ) { /* TODO */ }; double round( double x ) { /* TODO */ }; + +/* Therx code +{ + return (int) ( x + 0.5 ); +} +*/ + float roundf( float x ) { /* TODO */ }; long double roundl( long double x ) { /* TODO */ };