| 583 |
|
myEuler[2] = psi; |
| 584 |
|
|
| 585 |
|
return; |
| 586 |
+ |
} |
| 587 |
+ |
|
| 588 |
+ |
double DirectionalAtom::getZangle( ){ |
| 589 |
+ |
|
| 590 |
+ |
if( hasCoords ){ |
| 591 |
+ |
return zAngle; |
| 592 |
+ |
} |
| 593 |
+ |
else{ |
| 594 |
+ |
|
| 595 |
+ |
sprintf( painCave.errMsg, |
| 596 |
+ |
"Attempt to get zAngle for atom %d before coords set.\n", |
| 597 |
+ |
index ); |
| 598 |
+ |
painCave.isFatal = 1; |
| 599 |
+ |
simError(); |
| 600 |
+ |
return 0; |
| 601 |
+ |
} |
| 602 |
+ |
} |
| 603 |
+ |
|
| 604 |
+ |
void DirectionalAtom::setZangle( double zAng ){ |
| 605 |
+ |
|
| 606 |
+ |
if( hasCoords ){ |
| 607 |
+ |
zAngle = zAng; |
| 608 |
+ |
} |
| 609 |
+ |
else{ |
| 610 |
+ |
|
| 611 |
+ |
sprintf( painCave.errMsg, |
| 612 |
+ |
"Attempt to set zAngle for atom %d before coords set.\n", |
| 613 |
+ |
index ); |
| 614 |
+ |
painCave.isFatal = 1; |
| 615 |
+ |
simError(); |
| 616 |
+ |
} |
| 617 |
|
} |
| 618 |
|
|
| 619 |
+ |
void DirectionalAtom::addZangle( double zAng ){ |
| 620 |
+ |
|
| 621 |
+ |
if( hasCoords ){ |
| 622 |
+ |
zAngle += zAng; |
| 623 |
+ |
} |
| 624 |
+ |
else{ |
| 625 |
+ |
|
| 626 |
+ |
sprintf( painCave.errMsg, |
| 627 |
+ |
"Attempt to add zAngle to atom %d before coords set.\n", |
| 628 |
+ |
index ); |
| 629 |
+ |
painCave.isFatal = 1; |
| 630 |
+ |
simError(); |
| 631 |
+ |
} |
| 632 |
+ |
} |
| 633 |
+ |
|
| 634 |
|
double DirectionalAtom::max(double x, double y) { |
| 635 |
|
return (x > y) ? x : y; |
| 636 |
|
} |