aboutsummaryrefslogtreecommitdiff
path: root/src/electron.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-01-31 11:27:54 -0600
committertlatorre <tlatorre@uchicago.edu>2019-01-31 11:27:54 -0600
commite46bfc4a5a8d84288766e567fc65c20b86958313 (patch)
tree509e6349096293ee1099b6c60026bc6ca36d3b2e /src/electron.c
parent10502e7ed56c9cce707fcf027e9ba5a9e2695303 (diff)
downloadsddm-e46bfc4a5a8d84288766e567fc65c20b86958313.tar.gz
sddm-e46bfc4a5a8d84288766e567fc65c20b86958313.tar.bz2
sddm-e46bfc4a5a8d84288766e567fc65c20b86958313.zip
small updates to make sure we don't calculate nans
Diffstat (limited to 'src/electron.c')
-rw-r--r--src/electron.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/electron.c b/src/electron.c
index 73fe24e..60bcec7 100644
--- a/src/electron.c
+++ b/src/electron.c
@@ -98,7 +98,7 @@ double electron_get_angular_distribution_alpha(double T0)
*
* where T0 is the initial energy of the electron in MeV and c0, c1, c2,
* and c3 are constants which I fit out. */
- return 3.141318e-1 + 2.08198e-01/log(6.33331e-03*T0 + 1.19213e+00);
+ return fmin(100.0,3.141318e-1 + 2.08198e-01/log(6.33331e-03*T0 + 1.19213e+00));
}
double electron_get_angular_distribution_beta(double T0)