]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPainterHelper.cxx
Do not use TMath::AreEqual which does not exist yet in Root 5.24
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterHelper.cxx
index eca927efcfc49a986cf0c40dca5e346d24408ef4..95daa691315abb151b5c68775a80948280315d07 100644 (file)
@@ -323,7 +323,8 @@ AliMUONPainterHelper::ColorFromValue(Double_t value, Double_t min, Double_t max)
   else if (value <= min) rv = 0;
   else
   {
-    if  ( TMath::AreEqualRel(max,min,1E-6) ) return gStyle->GetColorPalette(1);
+//    if  ( TMath::AreEqualRel(max,min,1E-6) ) return gStyle->GetColorPalette(1);
+    if ( TMath::Abs(max-min) < 0.5*1E-6*TMath::Abs(max)+TMath::Abs(min) ) return gStyle->GetColorPalette(1);
     Double_t range = max - min;
     Double_t offset = value - min;
     rv = gStyle->GetColorPalette( 1 + int( offset*(gStyle->GetNumberOfColors()-2)/range - 0.5 ) );