Index: /trunk/MagicSoft/Mars/mastro/MAstro.cc
===================================================================
--- /trunk/MagicSoft/Mars/mastro/MAstro.cc	(revision 4565)
+++ /trunk/MagicSoft/Mars/mastro/MAstro.cc	(revision 4566)
@@ -509,5 +509,5 @@
 
     const Double_t et = mjd-epoch0; // Ellapsed time
-    return TMath::Floor(et/synmonth);
+    return et/synmonth;
 }
 
@@ -533,6 +533,9 @@
 //   GetMagicPeriod(t.GetMjd());
 //
-Double_t MAstro::GetMagicPeriod(Double_t mjd)
-{
-    return GetMoonPeriod(TMath::Nint(mjd))-284;
-}
+Int_t MAstro::GetMagicPeriod(Double_t mjd)
+{
+    const Double_t mmjd   = (Double_t)TMath::Nint(mjd);
+    const Double_t period = GetMoonPeriod(mmjd);
+
+    return (Int_t)TMath::Floor(period)-284;
+}
Index: /trunk/MagicSoft/Mars/mastro/MAstro.h
===================================================================
--- /trunk/MagicSoft/Mars/mastro/MAstro.h	(revision 4565)
+++ /trunk/MagicSoft/Mars/mastro/MAstro.h	(revision 4566)
@@ -58,5 +58,5 @@
     static Double_t GetMoonPhase(Double_t mjd);
     static Double_t GetMoonPeriod(Double_t mjd);
-    static Double_t GetMagicPeriod(Double_t mjd);
+    static Int_t    GetMagicPeriod(Double_t mjd);
 
     ClassDef(MAstro, 0)
