Skip to content

Commit

Permalink
using std::sqrt instead of TMath::Sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
nadrino committed Nov 19, 2024
1 parent 31aa79e commit 0699668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/GenericToolbox.Root.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ namespace GenericToolbox {
}
else{
(*correlationMatrix)[iRow][iCol] /=
TMath::Sqrt((*covarianceMatrix_)[iRow][iRow]*(*covarianceMatrix_)[iCol][iCol]);
std::sqrt((*covarianceMatrix_)[iRow][iRow]*(*covarianceMatrix_)[iCol][iCol]);
}

}
Expand All @@ -379,7 +379,7 @@ namespace GenericToolbox {
for(int iRow = 0 ; iRow < matrix_->GetNrows() ; iRow++){
for(int iCol = 0 ; iCol < matrix_->GetNcols() ; iCol++){
if( (*matrix_)[iRow][iRow] == 0 or (*matrix_)[iCol][iCol] == 0 ){ (*out)[iRow][iCol] = 0; }
else{ (*out)[iRow][iCol] /= TMath::Sqrt((*matrix_)[iRow][iRow]*(*matrix_)[iCol][iCol]); }
else{ (*out)[iRow][iCol] /= std::sqrt((*matrix_)[iRow][iRow]*(*matrix_)[iCol][iCol]); }
}
}

Expand Down

0 comments on commit 0699668

Please sign in to comment.