ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/portio.c
(Generate patch)

Comparing ray/src/common/portio.c (file contents):
Revision 2.4 by greg, Fri Nov 15 16:17:05 1996 UTC vs.
Revision 2.5 by greg, Fri Nov 15 16:20:35 1996 UTC

# Line 91 | Line 91 | double
91   getflt(fp)                      /* get a floating point number */
92   FILE  *fp;
93   {
94 +        long    l;
95          double  d;
96  
97 <        d = (getint(4, fp) + .5) / 0x7fffffff;
97 >        l = getint(4, fp);
98 >        d = (l + (l > 0 ? .5 : -.5)) * (1./0x7fffffff);
99          return(ldexp(d, (int)getint(1, fp)));
100   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines