Skip to content

Commit 24cc921

Browse files
authored
[math] for consistency, do the same check in TRotation
1 parent 57964be commit 24cc921

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

math/physics/src/TRotation.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ TVector3 class:
185185
#include "TRotation.h"
186186
#include "TMath.h"
187187
#include "TQuaternion.h"
188+
#include <cmath>
188189

189190
ClassImp(TRotation);
190191

@@ -323,7 +324,7 @@ TRotation::TRotation(const TQuaternion & Q) {
323324
/// Rotate along an axis.
324325

325326
TRotation & TRotation::Rotate(Double_t a, const TVector3& axis) {
326-
if (a != 0.0) {
327+
if (std::fmod(a, 2*M_PI) != 0.) {
327328
Double_t ll = axis.Mag();
328329
if (ll == 0.0) {
329330
Warning("Rotate(angle,axis)"," zero axis");

0 commit comments

Comments
 (0)