26 |
|
if (d > dref) |
27 |
|
return (int)(32768.001 - 32768.*dref/d) - 1; |
28 |
|
|
29 |
< |
return (int)(32767.*d/dref - 32768.); |
29 |
> |
return (int)(32767.*d/dref - 32768.999); |
30 |
|
} |
31 |
|
#endif |
32 |
|
|
42 |
|
if (c >= 32767) |
43 |
|
return FHUGE; |
44 |
|
|
45 |
< |
if (c >= 0) |
45 |
> |
if (c >= -1) |
46 |
|
return dref*32768./(32766.5 - c); |
47 |
|
|
48 |
< |
return dref*(32767.5 + c)*(1./32767.); |
48 |
> |
return dref*(32768.5 + c)*(1./32767.); |
49 |
|
} |
50 |
|
#endif |
51 |
|
|
97 |
|
} |
98 |
|
return -1; |
99 |
|
} |
100 |
< |
} else if (isview(s)) /* get view params */ |
100 |
> |
} else if (!strncmp(s, "SAMP360=", 8)) |
101 |
> |
dcp->gotview--; |
102 |
> |
else if (isview(s)) /* get view params */ |
103 |
|
dcp->gotview += (sscanview(&dcp->vw, s) > 0); |
104 |
|
if (dcp->hdrflags & HF_HEADOUT) |
105 |
|
fputs(s, stdout); /* copy to standard output */ |
119 |
|
} |
120 |
|
return 0; |
121 |
|
} |
122 |
+ |
dcp->gotview *= (dcp->gotview > 0); |
123 |
|
if (dcp->hdrflags & HF_HEADOUT) { /* finish header */ |
124 |
|
if (!(dcp->hdrflags & HF_HEADIN)) |
125 |
|
newheader("RADIANCE", stdout); |