diff --git a/src/distribution_multi.cpp b/src/distribution_multi.cpp index d4a728c71..0c1ecddec 100644 --- a/src/distribution_multi.cpp +++ b/src/distribution_multi.cpp @@ -59,8 +59,8 @@ Direction PolarAzimuthal::sample() const double mu = mu_->sample(); if (mu == 1.0) return u_ref_; - // Sample azimuthal angle - double phi = phi_->sample(); + // Sample the azimuthal angle with an offset to match azimuth conventions + double phi = phi_->sample() + 0.5*PI; return rotate_angle(u_ref_, mu, &phi); } diff --git a/tests/regression_tests/source/results_true.dat b/tests/regression_tests/source/results_true.dat index 90cc3ec1f..6fe76c8cd 100644 --- a/tests/regression_tests/source/results_true.dat +++ b/tests/regression_tests/source/results_true.dat @@ -1,2 +1,2 @@ k-combined: -3.026614E-01 3.952008E-03 +2.800827E-01 7.360163E-03