Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
xanthospap committed Dec 11, 2023
1 parent 79cc399 commit 3dbffc6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tpdate2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ class TwoPartDate2 {
using FDOUBLE = /*long*/ double;
int _mjd; /** Mjd */
FDOUBLE _fday; /** fractional part of day */

/** Construct from MJD and fractional days.
*
* This is only private and should be used in rare cases. Normal users,
* should explicitely cast the second argument to FractionalSeconds or
* FractionalDays to avoid misconceptions (i.e. is the parameters fractional
* seconds or fractional days?).
*/
explicit TwoPartDate2(int mjd, FDOUBLE fday) noexcept
: _mjd(mjd), _fday(fday) {
normalize();
}

public:
/** Constructor from datetime<T> */
Expand Down

0 comments on commit 3dbffc6

Please sign in to comment.