Server IP : 68.65.122.142 / Your IP : 3.149.255.208 Web Server : LiteSpeed System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : glenirhm ( 1318) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/locale/scn/../ms/../hit/../afh/../ch/../nai/../gl/../nap/../khi/../ss/../fon/../bua/../sr@ijekavianlatin/../ch/../ks/../arn/../bm/../tn/../nv/../den/../kw_GB/../arp/../sn/../ia/../ks@aran/../es_ES/../fi_FI/../st/../anp/../phi/../gmh/../be/../kab/../es/../mkh/../../libgpg-error/../awk/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
# round.awk --- do normal rounding # # Arnold Robbins, arnold@skeeve.com, Public Domain # August, 1996 function round(x, ival, aval, fraction) { ival = int(x) # integer part, int() truncates # see if fractional part if (ival == x) # no fraction return ival # ensure no decimals if (x < 0) { aval = -x # absolute value ival = int(aval) fraction = aval - ival if (fraction >= .5) return int(x) - 1 # -2.5 --> -3 else return int(x) # -2.3 --> -2 } else { fraction = x - ival if (fraction >= .5) return ival + 1 else return ival } }