From 1e8a95d76fd30fcf4ba3949fc63a5e6ce9ec8d52 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 18 Nov 2019 10:16:26 -0600 Subject: fix bug in quad causing it to always return 0 when f was less than 1 --- src/quad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quad.c') diff --git a/src/quad.c b/src/quad.c index ca5483c..8b2d754 100644 --- a/src/quad.c +++ b/src/quad.c @@ -312,7 +312,7 @@ int quad(event *ev, double *pos, double *t0, size_t npoints, double f) * macroscopic distances in the detector we want to only sample the * quad points near the start of the track, i.e. the points with the * earliest times. */ - nresults = (int) f*nresults; + nresults = (int) (f*nresults); } /* Sort the x, y, z, and t0 columns so we can calculate the median. Note: -- cgit