aboutsummaryrefslogtreecommitdiff
path: root/src/likelihood.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-07-29 12:23:30 -0500
committertlatorre <tlatorre@uchicago.edu>2019-07-29 12:23:30 -0500
commit92a5425aaa49d90d4d4c1e88e8595ce932c1ad9b (patch)
tree56e9bb4d541c1b3a5df34edae5742699dd2f41ff /src/likelihood.c
parentebc0f100371942e99c433cf967b55524a9765c87 (diff)
downloadsddm-92a5425aaa49d90d4d4c1e88e8595ce932c1ad9b.tar.gz
sddm-92a5425aaa49d90d4d4c1e88e8595ce932c1ad9b.tar.bz2
sddm-92a5425aaa49d90d4d4c1e88e8595ce932c1ad9b.zip
fast_sqrt -> sqrt
After some testing, I realized that the fast_sqrt() function wasn't really faster than the native sqrt function.
Diffstat (limited to 'src/likelihood.c')
-rw-r--r--src/likelihood.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 9037cb9..abf064f 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -572,10 +572,10 @@ static void get_expected_charge(double beta, double theta0, double *pos, double
/* Calculate the cosine of the angle between the track direction and the
* vector to the PMT. */
cos_theta = DOT(dir,pmt_dir);
- sin_theta = fast_sqrt(1-cos_theta*cos_theta);
+ sin_theta = sqrt(1-cos_theta*cos_theta);
cos_theta_pmt = -DOT(pmt_dir,pmts[pmt].normal);
- sin_theta_pmt = fast_sqrt(1-cos_theta_pmt*cos_theta_pmt);
+ sin_theta_pmt = sqrt(1-cos_theta_pmt*cos_theta_pmt);
theta0 = fmax(theta0,get_theta0_min(distance_to_pmt,PMT_RADIUS,sin_theta_pmt));