# | Line 111 | Line 111 | rayorigin( /* start new ray from old one */ | |
---|---|---|
111 | return(-1); /* upper reflection limit */ | |
112 | if (r->rweight >= minweight) | |
113 | return(0); | |
114 | < | if (frandom() < r->rweight/minweight) |
114 | > | if (frandom() > r->rweight/minweight) |
115 | return(-1); | |
116 | rw = minweight/r->rweight; /* promote survivor */ | |
117 | scalecolor(r->rcoef, rw); | |
118 | r->rweight = minweight; | |
119 | return(0); | |
120 | } | |
121 | < | return(r->rlvl <= maxdepth && r->rweight >= minweight ? 0 : -1); |
121 | > | return(r->rlvl <= abs(maxdepth) && r->rweight >= minweight ? 0 : -1); |
122 | } | |
123 | ||
124 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |