Changeset 1900
- Timestamp:
- 04/03/03 13:55:05 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MBinning.h
r1899 r1900 44 44 Int_t FindLoEdge(Double_t val) const 45 45 { 46 for (int i=0; i<fEdges.GetSize(); i++) 46 if (val<GetEdgeLo() || val>=GetEdgeHi()) 47 return -1; 48 49 for (int i=1; i<fEdges.GetSize(); i++) 47 50 { 48 if (((TArrayD)fEdges)[i] <= val)49 return i ;51 if (((TArrayD)fEdges)[i] >= val) 52 return i-1; 50 53 } 51 54 return -1; … … 53 56 Int_t FindHiEdge(Double_t val) const 54 57 { 55 for (int i=0; i<fEdges.GetSize()-1; i++) 58 if (val<GetEdgeLo() || val>=GetEdgeHi()) 59 return -1; 60 61 for (int i=1; i<fEdges.GetSize()-1; i++) 56 62 { 57 if ( val <= ((TArrayD)fEdges)[i])58 return i +1;63 if (((TArrayD)fEdges)[i] >= val) 64 return i; 59 65 } 60 66 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.