--- ray/src/util/glarendx.c 1991/05/02 14:00:58 1.9 +++ ray/src/util/glarendx.c 1992/11/19 09:59:08 2.3 @@ -127,8 +127,8 @@ char *s; if (print_header) /* copy to output */ fputs(s, stdout); - if (!strncmp(s, VIEWSTR, VIEWSTRL)) - sscanview(&midview, s+VIEWSTRL); + if (isview(s)) + sscanview(&midview, s); else if (isformat(s)) { formatval(fmt, s); wrongformat = strcmp(fmt, "ascii"); @@ -289,6 +289,8 @@ FVECT sd, vd, vu; d = DOT(sd,vu)/sqrt(1.0-d*d); if (d >= 1.0) tau = 0.0; + else if (d <= -1.0) + tau = 180.0; else tau = acos(d) * (180./PI); return( exp( sigma*( (35.2 - tau*.31889 - 1.22*exp(-.22222*tau))*1e-3