Changeset 1901


Ignore:
Timestamp:
04/03/03 13:58:19 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MBinning.h

    r1900 r1901  
    4747            return -1;
    4848
    49         for (int i=1; i<fEdges.GetSize(); i++)
     49        for (int i=1; i<fEdges.GetSize()-1; i++)
    5050        {
    5151            if (((TArrayD)fEdges)[i] >= val)
     
    5656    Int_t FindHiEdge(Double_t val) const
    5757    {
    58         if (val<GetEdgeLo() || val>=GetEdgeHi())
    59             return -1;
    60 
    61         for (int i=1; i<fEdges.GetSize()-1; i++)
    62         {
    63             if (((TArrayD)fEdges)[i] >= val)
    64                 return i;
    65         }
    66         return -1;
     58        const Int_t i = FindLoEdge(val);
     59        return i<0 ? -1 : i+1;
    6760    }
    6861
Note: See TracChangeset for help on using the changeset viewer.