home *** CD-ROM | disk | FTP | other *** search
- /* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
- /* double to integer conversion with bound limits imposed */
- #include <stdio.h>
-
- #define MAXINT 32767
- #define MININT -32768
-
- int dblint(dbl)
- double dbl;
- {
- if (dbl > MAXINT)
- return(MAXINT);
- else if (dbl < MININT)
- return(MININT);
- else
- return((int)dbl);
- }
-
-