Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -66,8 +66,6 @@ public: //operators
|
||||
return vec3f(-m_data[0],-m_data[1],-m_data[2]);
|
||||
}
|
||||
public:
|
||||
#define TOOLS_VEC3F_MORE_PREC
|
||||
#ifdef TOOLS_VEC3F_MORE_PREC
|
||||
float length() const {
|
||||
return float(::sqrt(m_data[0]*m_data[0]+m_data[1]*m_data[1]+m_data[2]*m_data[2]));
|
||||
}
|
||||
@@ -86,11 +84,6 @@ public:
|
||||
a_cos = dot(a_v)/(this_length*a_v_length);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
float length() const {return parent::length(::sqrtf);}
|
||||
float normalize() {return parent::normalize(::sqrtf);}
|
||||
bool cos_angle(const vec3f& a_v,float& a_cos) const {return parent::cos_angle(a_v,a_cos,::sqrtf);}
|
||||
#endif
|
||||
|
||||
bool theta_phi(float& a_theta,float& a_phi) const {
|
||||
return parent::theta_phi(a_theta,a_phi,::sqrtf,::atan2f);
|
||||
@@ -118,8 +111,6 @@ inline vec3f operator*(float a_f,const vec3f& a_v) {
|
||||
return res;
|
||||
}
|
||||
|
||||
#define TOOLS_VEC3F_MORE_PREC
|
||||
#ifdef TOOLS_VEC3F_MORE_PREC
|
||||
inline void get_normal(const vec3f& a_p0,const vec3f& a_p1,const vec3f& a_p2,vec3f& a_nm,
|
||||
vec3f& a_tmp_1,vec3f& a_tmp_2) {
|
||||
// Used to optimize sg::bin().
|
||||
@@ -135,12 +126,6 @@ inline void get_normal(const vec3f& a_p0,const vec3f& a_p1,const vec3f& a_p2,vec
|
||||
|
||||
a_nm.normalize();
|
||||
}
|
||||
#else
|
||||
inline void get_normal(const vec3f& a_p0,const vec3f& a_p1,const vec3f& a_p2,vec3f& a_nm,
|
||||
vec3f& a_tmp_1,vec3f& a_tmp_2) {
|
||||
get_normal<float>(a_p0,a_p1,a_p2,a_nm,a_tmp_1,a_tmp_2,::sqrtf);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user