MCPcopy Create free account
hub / github.com/Geant4/geant4 / angle

Method angle

source/externals/clhep/src/BasicVector3D.cc:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 //--------------------------------------------------------------------------
34 template<>
35 float BasicVector3D<float>::angle(const BasicVector3D<float> & v) const {
36 double cosa = 0;
37 double ptot = mag()*v.mag();
38 if(ptot > 0) {
39 cosa = dot(v)/ptot;
40 if(cosa > 1) cosa = 1;
41 if(cosa < -1) cosa = -1;
42 }
43 return std::acos(cosa);
44 }
45
46 //--------------------------------------------------------------------------
47 template<>

Callers 15

wheel_rotateMethod · 0.80
polarAngleMethod · 0.80
azimAngleMethod · 0.80
choosePointAlongTrajMethod · 0.80
PostStepDoItMethod · 0.80
CheckDirectionMethod · 0.80
SampleSecondariesMethod · 0.80
DielectricLUTMethod · 0.80
DielectricLUTDAVISMethod · 0.80
DielectricDichroicMethod · 0.80
InsideRoIMethod · 0.80

Calls 1

magMethod · 0.45

Tested by

no test coverage detected