Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hist] Fix assertion failure (invalid comparator) #17211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hist/hist/src/TGraph.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -698,23 +698,23 @@ Bool_t TGraph::CompareArg(const TGraph* gr, Int_t left, Int_t right)
Double_t xl = 0, yl = 0, xr = 0, yr = 0;
gr->GetPoint(left, xl, yl);
gr->GetPoint(right, xr, yr);
return (TMath::ATan2(yl, xl) > TMath::ATan2(yr, xr));
return (TMath::ATan2(yl, xl) >= TMath::ATan2(yr, xr));
}

////////////////////////////////////////////////////////////////////////////////
/// Return kTRUE if fX[left] > fX[right]. Can be used by Sort.

Bool_t TGraph::CompareX(const TGraph* gr, Int_t left, Int_t right)
{
return gr->fX[left] > gr->fX[right];
return gr->fX[left] >= gr->fX[right];
}

////////////////////////////////////////////////////////////////////////////////
/// Return kTRUE if fY[left] > fY[right]. Can be used by Sort.

Bool_t TGraph::CompareY(const TGraph* gr, Int_t left, Int_t right)
{
return gr->fY[left] > gr->fY[right];
return gr->fY[left] >= gr->fY[right];
}

////////////////////////////////////////////////////////////////////////////////
Expand All @@ -724,7 +724,7 @@ Bool_t TGraph::CompareY(const TGraph* gr, Int_t left, Int_t right)
Bool_t TGraph::CompareRadius(const TGraph* gr, Int_t left, Int_t right)
{
return gr->fX[left] * gr->fX[left] + gr->fY[left] * gr->fY[left]
> gr->fX[right] * gr->fX[right] + gr->fY[right] * gr->fY[right];
>= gr->fX[right] * gr->fX[right] + gr->fY[right] * gr->fY[right];
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading