mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
fixing compiler errors
This commit is contained in:
parent
d7b20fb51e
commit
aaef39d710
2 changed files with 4 additions and 4 deletions
|
|
@ -685,7 +685,7 @@ void rotate_angle_c(double uvw[3], const double mu, double* phi) {
|
|||
w0 = uvw[2];
|
||||
|
||||
// Sample azimuthal angle in [0,2pi) if none provided
|
||||
if (phi != NULL) {
|
||||
if (phi != nullptr) {
|
||||
phi_ = (*phi);
|
||||
} else {
|
||||
phi_ = 2. * PI * prn();
|
||||
|
|
@ -694,8 +694,8 @@ void rotate_angle_c(double uvw[3], const double mu, double* phi) {
|
|||
// Precompute factors to save flops
|
||||
sinphi = std::sin(phi_);
|
||||
cosphi = std::cos(phi_);
|
||||
a = std::sqrt(std::max(0., 1. - mu * mu));
|
||||
b = std::sqrt(std::max(0., 1. - w0 * w0));
|
||||
a = std::sqrt(std::fmax(0., 1. - mu * mu));
|
||||
b = std::sqrt(std::fmax(0., 1. - w0 * w0));
|
||||
|
||||
// Need to treat special case where sqrt(1 - w**2) is close to zero by
|
||||
// expanding about the v component rather than the w component
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ extern "C" void calc_zn_c(const int n, const double rho, const double phi,
|
|||
//==============================================================================
|
||||
|
||||
extern "C" void rotate_angle_c(double uvw[3], const double mu,
|
||||
double* phi=NULL);
|
||||
double* phi=nullptr);
|
||||
|
||||
//==============================================================================
|
||||
// MAXWELL_SPECTRUM samples an energy from the Maxwell fission distribution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue