diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-08-26 10:25:41 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-08-26 10:25:41 -0500 |
commit | d319be4e9710a4c87a6217ba0a7b06a73b9e65cc (patch) | |
tree | e5a3dc708986b7a8564412fb370567b8a650fd49 /src/path.h | |
parent | 6dd68960212773f54dc56273f811b88e2bac5b09 (diff) | |
download | sddm-d319be4e9710a4c87a6217ba0a7b06a73b9e65cc.tar.gz sddm-d319be4e9710a4c87a6217ba0a7b06a73b9e65cc.tar.bz2 sddm-d319be4e9710a4c87a6217ba0a7b06a73b9e65cc.zip |
fix a bug in get_{shower,delta_ray}_weights() causing crash
This commit fixes a bug in get_shower_weights() and get_delta_ray_weights()
which was causing an inf value to propagate and cause the fitter to crash. The
problem came because due to floating point roundoff the cdf value at the end of
the loop was slightly greater than the last cdf value we wanted which was
causing it to get mapped to cos(theta) = -1 (I think?) and then subsequently
get interpolated to an infinite value for xcdf.
The fix is just to make sure that the x coordinate is always between x1 and x2.
Diffstat (limited to 'src/path.h')
0 files changed, 0 insertions, 0 deletions