Changeset 1177 in Sophya for trunk/SophyaLib


Ignore:
Timestamp:
Sep 4, 2000, 12:15:57 PM (25 years ago)
Author:
ansari
Message:

bug constructeur Vector3d(theta, phi) corrige.

dominique

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/vector3d.cc

    r792 r1177  
    4343//--
    4444{
    45   _theta=mod(theta,M_PI); // dans [0;pi]
     45 // _theta=mod(theta,M_PI); // dans [0;pi]
     46 // Version precedente fausse: _theta=M_PI est valide. Or mod(M_PI,M_PI)=0!
     47 // De plus theta>pi ou <0 n'a pas de sens. Dominique Yvon
     48        if( (theta<0.) || (theta>M_PI) )
     49        {       string exmsg = "Wrong initialisation of theta in Vector3d::Vector3d(double theta, double phi)";
     50                throw( ParmError(exmsg) );
     51        }
     52  _theta=theta; // dans [0;pi]
    4653  _phi=mod(phi,pi2); // dans [0;2pi]
    4754  ThetaPhi2xyz();
Note: See TracChangeset for help on using the changeset viewer.