13 #pragma implementation
16 #include "CLHEP/Vector/Rotation.h"
23 void HepRotation::decompose(HepAxisAngle & rotation, Hep3Vector & boost)
const {
25 rotation = axisAngle();
28 void HepRotation::decompose(Hep3Vector & boost, HepAxisAngle & rotation)
const {
30 rotation = axisAngle();
33 double HepRotation::distance2(
const HepRotation & r )
const {
34 double sum = rxx * r.rxx + rxy * r.rxy + rxz * r.rxz
35 + ryx * r.ryx + ryy * r.ryy + ryz * r.ryz
36 + rzx * r.rzx + rzy * r.rzy + rzz * r.rzz;
37 double answer = 3.0 - sum;
38 return (answer >= 0 ) ? answer : 0;
41 double HepRotation::howNear(
const HepRotation & r )
const {
42 return std::sqrt( distance2( r ) );
45 bool HepRotation::isNear(
const HepRotation & r,
47 return distance2( r ) <= epsilon*
epsilon;
50 double HepRotation::norm2()
const {
51 double answer = 3.0 - rxx - ryy - rzz;
52 return (answer >= 0 ) ? answer : 0;
double epsilon(double density, double temperature)