--- ray/src/rt/t_func.c 1991/11/25 09:50:59 2.2 +++ ray/src/rt/t_func.c 2003/03/05 16:16:53 2.6 @@ -1,15 +1,12 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: t_func.c,v 2.6 2003/03/05 16:16:53 greg Exp $"; #endif - /* * t_func.c - routine for procedural textures. - * - * 4/8/86 */ +#include "copyright.h" + #include "ray.h" #include "func.h" @@ -47,9 +44,9 @@ register RAY *r; errno = 0; for (i = 0; i < 3; i++) { disp[i] = evalue(mf->ep[i]); - if (errno) { + if (errno == EDOM || errno == ERANGE) { objerror(m, WARNING, "compute error"); - return; + return(0); } } if (mf->f != &unitxf) @@ -61,4 +58,5 @@ register RAY *r; d = 1.0 / mf->f->sca; for (i = 0; i < 3; i++) r->pert[i] += disp[i] * d; + return(0); }