29 #include <gsl/gsl_rng.h>
30 #include <gsl/gsl_randist.h>
87 array[0] = array[1] = array[2] = 0;
99 extern inline int AdCartesianDistanceCheck(
double* position1,
double* position2,
double separation)
101 if(fabs(position1[0] - position2[0]) > separation)
104 if(fabs(position1[1] - position2[1]) > separation)
107 if(fabs(position1[2] - position2[2]) > separation)
118 extern inline int AdCartesianDistanceVectorCheck(
Vector3D* separation,
double distance)
122 components = separation->
vector;
124 if(fabs(components[0]) > distance)
127 if(fabs(components[1]) > distance)
130 if(fabs(components[2]) > distance)
143 extern inline void Ad3DVectorScalarMultiply(
Vector3D* vector,
double value)
158 extern inline double Ad3DDotProduct(
Vector3D* vector_one,
Vector3D* vector_two)
163 for(product = 0, i=3; --i>=0;)
164 product += vector_one->
vector[i] * vector_two->
vector[i];
214 extern inline void Ad3DVectorLength(
Vector3D* vec)
225 extern inline void Ad3DVectorLengthSquared(
Vector3D* vec)
238 void Ad3DVectorLength(
Vector3D* vec);
239 int AdCartesianDistanceCheck(
double* position1,
double* position2,
double separation);
240 int AdCartesianDistanceVectorCheck(
Vector3D* separation,
double distance);
241 void Ad3DVectorScalarMultiply(
Vector3D* vector,
double value);
242 void Ad3DVectorLengthSquared(
Vector3D* vec);