| 375 |
|
axmax = -1; avmax = 0; |
| 376 |
|
for (i = 3; i--; ) { |
| 377 |
|
d = vgp[i] - cgp[i]; |
| 378 |
< |
if (d < 0) d = -d; |
| 378 |
> |
if (d < 0.) d = -d; |
| 379 |
|
if (d > avmax) { |
| 380 |
|
avmax = d; |
| 381 |
|
axmax = i; |
| 382 |
|
} |
| 383 |
|
} |
| 384 |
|
#ifdef DEBUG |
| 385 |
< |
if (axmax < 0) |
| 385 |
> |
if (axmax < 0.) |
| 386 |
|
error(CONSISTENCY, "botched axis computation in docell"); |
| 387 |
|
#endif |
| 388 |
|
/* compute offset vectors */ |
| 390 |
|
for (i = 3; i--; ) |
| 391 |
|
v1[i] = hp->xv[j][i] * d; |
| 392 |
|
d = 0.5/hp->grid[j=(axmax+2)%3]; |
| 393 |
< |
if (DOT(hp->wn[axmax], vc) < 0) |
| 393 |
> |
if (DOT(hp->wn[axmax], vc) < 0.) |
| 394 |
|
d = -d; /* reverse vertex ordering */ |
| 395 |
|
for (i = 3; i--; ) |
| 396 |
|
v2[i] = hp->xv[j][i] * d; |
| 469 |
|
} |
| 470 |
|
|
| 471 |
|
|
| 472 |
+ |
int |
| 473 |
|
beam_sync() /* synchronize beams on server */ |
| 474 |
|
{ |
| 475 |
|
cbeamop(DR_NEWSET, cbeam, ncbeams, &odev.v, odev.hres, odev.vres); |
| 476 |
+ |
return(ncbeams); |
| 477 |
|
} |
| 478 |
|
|
| 479 |
|
|