Ignore:
Timestamp:
07/08/05 11:46:47 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r6078 r7176  
    132132{
    133133    static const Double_t sqrt2 = TMath::Sqrt(2.);
    134     return TMath::Erf((x-mean)/(sigma*sqrt2));
     134
     135    const Double_t rc = TMath::Erf((x-mean)/(sigma*sqrt2));
     136
     137    if (rc<0)
     138        return 0;
     139    if (rc>1)
     140        return 1;
     141
     142    return rc;
    135143}
    136144
Note: See TracChangeset for help on using the changeset viewer.