Changeset 13777 for trunk


Ignore:
Timestamp:
05/18/12 17:44:24 (13 years ago)
Author:
tbretz
Message:
Support also JD as constructor argument and also return JD()
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Time.cc

    r12618 r13777  
    129129void Time::Mjd(double mjd)
    130130{
     131    if (mjd > 2400000.5)
     132        mjd -= 2400000.5;
     133
    131134    // Convert MJD to seconds since offset
    132135    mjd -= 40587;
  • trunk/FACT++/src/Time.h

    r13676 r13777  
    7777    void Mjd(double mjd);
    7878    double Mjd() const;
     79    double JD() const { return Mjd()+2400000.5; }
    7980
    8081    // Check validity
Note: See TracChangeset for help on using the changeset viewer.