33 #ifndef PLANCK_GEOM_UTILS_H 34 #define PLANCK_GEOM_UTILS_H 50 if (loc.
x==0 && loc.
y==0)
52 vec3 east (-loc.
y, loc.
x, 0);
61 return atan2 (crossprod(v1,v2).Length(), dotprod(v1,v2));
67 inline double cosdist_zphi (
double z1,
double phi1,
double z2,
double phi2)
70 return z1*z2+cos(phi1-phi2)*sqrt((1.-z1*z1)*(1.-z2*z2));
double v_angle(const vec3 &v1, const vec3 &v2)
double safe_atan2(double y, double x)
void find_enclosing_circle(const std::vector< vec3 > &point, vec3 ¢er, double &cosrad)
vec3_t< T > crossprod(const vec3_t< T > &a, const vec3_t< T > &b)
double orientation(const vec3 &loc, const vec3 &dir)
T dotprod(const vec3_t< T > &v1, const vec3_t< T > &v2)
double cosdist_zphi(double z1, double phi1, double z2, double phi2)