Changeset 18877


Ignore:
Timestamp:
06/06/17 11:10:27 (7 years ago)
Author:
(none)
Message:
fix uniform sampling of dtheta to be sampled uniform in r**2 and avoid sqrt of negative value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msim/MSimPointingPos.cc

    r18280 r18877  
    215215    else
    216216    {
    217         dtheta = TMath::Sqrt(gRandom->Uniform(fOffTargetDistance));
     217        dtheta = TMath::Sqrt(gRandom->Uniform(fTMath::Power(OffTargetDistance, 2)));
    218218        dphi   = gRandom->Uniform(TMath::TwoPi());
    219219    }
Note: See TracChangeset for help on using the changeset viewer.