| # | Line 96 | Line 96 | register RAY *r; | |
|---|---|---|
| 96 | for (i = 0; i < 3; i++) /* perturb direction */ | |
| 97 | p.rdir[i] = r->rdir[i] + | |
| 98 | 2.*(1.-rindex)*r->pert[i]; | |
| 99 | < | normalize(p.rdir); |
| 99 | > | if (normalize(p.rdir) == 0.0) { |
| 100 | > | objerror(m, WARNING, "bad perturbation"); |
| 101 | > | VCOPY(p.rdir, r->rdir); |
| 102 | > | } |
| 103 | } else { | |
| 104 | VCOPY(p.rdir, r->rdir); | |
| 105 | transtest = 2; | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |