aboutsummaryrefslogtreecommitdiff
path: root/src/scattering.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scattering.c')
-rw-r--r--src/scattering.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scattering.c b/src/scattering.c
index 0247c62..c4bdd57 100644
--- a/src/scattering.c
+++ b/src/scattering.c
@@ -158,7 +158,7 @@ double get_probability(double beta, double cos_theta, double theta0)
/* Technically this isn't defined up to a sign, but it doesn't matter since
* we are going to square it everywhere. */
- sin_theta = fabs(sin(acos(cos_theta)));
+ sin_theta = sqrt(1-pow(cos_theta,2));
return gsl_spline2d_eval(spline, beta*cos_theta, beta*sin_theta*theta0, xacc, yacc)/(theta0*sin_theta);
}