diff options
author | Arun Isaac | 2021-06-30 14:42:24 +0530 |
---|---|---|
committer | Arun Isaac | 2021-06-30 14:42:24 +0530 |
commit | f60a54c593411803a8617c9dcda2f667095d2487 (patch) | |
tree | 36dd031ef7f0edf60789f81cd3740da5cecd102a /include | |
parent | 7ec6e79a83868fb618b844f7eb46a693c3f021e1 (diff) | |
download | nsmc-f60a54c593411803a8617c9dcda2f667095d2487.tar.gz nsmc-f60a54c593411803a8617c9dcda2f667095d2487.tar.lz nsmc-f60a54c593411803a8617c9dcda2f667095d2487.zip |
Support sampling in sphere.
* src/nd-random.sc (random-vector-in-sphere): New function.
* include/nd-random.h (random_vector_in_sphere): Declare it.
Diffstat (limited to 'include')
-rw-r--r-- | include/nd-random.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nd-random.h b/include/nd-random.h index 3d3c298..a260bf1 100644 --- a/include/nd-random.h +++ b/include/nd-random.h @@ -27,6 +27,7 @@ #include <gsl/gsl_vector.h> void random_direction_vector (const gsl_rng* r, gsl_vector* x); +void random_vector_in_sphere (const gsl_rng* r, double radius, gsl_vector* x); void cone_random_vector (const gsl_rng* r, const gsl_vector* mean, double theta_max, gsl_vector* x); void hollow_cone_random_vector (const gsl_rng* r, const gsl_vector* mean, double theta_min, double theta_max, gsl_vector* x); |