Skip to content
Snippets Groups Projects
Commit 85ba544d authored by Evgueni Tcherniaev's avatar Evgueni Tcherniaev
Browse files

Use: if (rxx+ryy+rzz==3)

parent 8e61d57a
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,7 @@ inline
G4ThreeVector G4AffineTransform::TransformPoint(const G4ThreeVector& vec) const
{
G4double vecx = vec.x(), vecy = vec.y(), vecz = vec.z();
if (rxx + ryy + rzz == 3) return G4ThreeVector(vecx + tx, vecy + ty, vecz + tz);
//if (NoRotation) return G4ThreeVector(vecx + tx, vecy + ty, vecz + tz);
return G4ThreeVector(vecx*rxx + vecy*ryx + vecz*rzx + tx,
vecx*rxy + vecy*ryy + vecz*rzy + ty,
......@@ -223,6 +224,7 @@ G4ThreeVector G4AffineTransform::TransformPoint(const G4ThreeVector& vec) const
inline
G4ThreeVector G4AffineTransform::TransformAxis(const G4ThreeVector& axis) const
{
if (rxx + ryy + rzz == 3) return axis;
//if (NoRotation) return axis;
G4double axisx = axis.x(), axisy = axis.y(), axisz = axis.z();
return G4ThreeVector(axisx*rxx + axisy*ryx + axisz*rzx,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment