aboutsummaryrefslogtreecommitdiff
path: root/solid_angle.c
diff options
context:
space:
mode:
Diffstat (limited to 'solid_angle.c')
-rw-r--r--solid_angle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/solid_angle.c b/solid_angle.c
index cbc71f1..6959e2d 100644
--- a/solid_angle.c
+++ b/solid_angle.c
@@ -20,7 +20,7 @@ double get_solid_angle(double *pos, double *pmt, double *n, double r)
r0 = sqrt(R*R - L*L);
a = 4*r0*r/pow(r0+r,2);
- Rmax = L*L + (r0+r)*(r0+r);
+ Rmax = sqrt(L*L + (r0+r)*(r0+r));
k = sqrt(4*r0*r/(L*L + pow(r0+r,2)));
if (r0 <= r) {