ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/fvect.c
(Generate patch)

Comparing ray/src/common/fvect.c (file contents):
Revision 2.23 by greg, Thu May 21 07:02:23 2015 UTC vs.
Revision 2.24 by greg, Thu Jul 23 18:22:26 2015 UTC

# Line 170 | Line 170 | int randomize                          /* randomize orientation */
170                  v1[0] = 0.5 - frandom();
171                  v1[1] = 0.5 - frandom();
172                  v1[2] = 0.5 - frandom();
173 <                switch ((int)(frandom()*5.99999)) {
173 >                switch ((int)(frandom()*6.)) {
174                  case 0: ord[0] = 0; ord[1] = 1; ord[2] = 2; break;
175                  case 1: ord[0] = 0; ord[1] = 2; ord[2] = 1; break;
176                  case 2: ord[0] = 1; ord[1] = 0; ord[2] = 2; break;
177                  case 3: ord[0] = 1; ord[1] = 2; ord[2] = 0; break;
178                  case 4: ord[0] = 2; ord[1] = 0; ord[2] = 1; break;
179 <                case 5: ord[0] = 2; ord[1] = 1; ord[2] = 0; break;
179 >                default: ord[0] = 2; ord[1] = 1; ord[2] = 0; break;
180                  }
181          } else {
182                  v1[0] = v1[1] = v1[2] = 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines