diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-09-17 14:03:59 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-09-17 14:03:59 -0500 |
commit | f60f7aa42a7e2ea2d213c836d2997a39cf45eb29 (patch) | |
tree | 0c56332b4988e6c509bf6ec8aa97eba41f98d804 /src/misc.h | |
parent | 500f23754ba90d34eea00f76b222458dce353d96 (diff) | |
download | sddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.tar.gz sddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.tar.bz2 sddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.zip |
add get_path_length()
This commit adds a function called get_path_length() which computes the path
length inside and outside a sphere for a line segment between two points. This
will be useful for calculating the photon absorption for paths which cross the
AV and for computing the time of flight of photons from a track to a PMT.
Diffstat (limited to 'src/misc.h')
-rw-r--r-- | src/misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -6,6 +6,7 @@ #define LN_MAX 100 #define LNFACT_MAX 100 +void get_path_length(double *pos1, double *pos2, double R, double *l1, double *l2); double ln(unsigned int n); double lnfact(unsigned int n); double kahan_sum(double *x, size_t n); |