]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/astro.h
ICU-491.11.3.tar.gz
[apple/icu.git] / icuSources / i18n / astro.h
index 8291d60eda646a44915a8b546db5bd19741893bf..cd20b6cf2578b054e3615f474d449fa9128990b2 100644 (file)
@@ -1,5 +1,5 @@
 /************************************************************************
- * Copyright (C) 1996-2003, International Business Machines Corporation *
+ * Copyright (C) 1996-2008, International Business Machines Corporation *
  * and others. All Rights Reserved.                                     *
  ************************************************************************
  *  2003-nov-07   srl       Port from Java
@@ -497,7 +497,7 @@ public:
    * Note: In this case, "vernal" refers to the northern hemisphere's seasons.
    * @internal
    */
-  static double VERNAL_EQUINOX();
+//  static double VERNAL_EQUINOX();
 
   /**
    * Constant representing the summer solstice.
@@ -513,7 +513,7 @@ public:
    * Note: In this case, "autumn" refers to the northern hemisphere's seasons.
    * @internal
    */
-  static double AUTUMN_EQUINOX();
+//  static double AUTUMN_EQUINOX();
 
   /**
    * Constant representing the winter solstice.
@@ -603,7 +603,7 @@ public:
    * For use with {@link #getMoonTime getMoonTime}
    * @internal
    */
-  static const MoonAge FIRST_QUARTER();
+//  static const MoonAge FIRST_QUARTER();
 
   /**
    * Constant representing a full moon.
@@ -617,7 +617,7 @@ public:
    * For use with {@link #getMoonTime getMoonTime}
    * @internal
    */
-  static const MoonAge LAST_QUARTER();
+//  static const MoonAge LAST_QUARTER();
 
   /**
    * Find the next or previous time at which the Moon's ecliptic
@@ -643,18 +643,20 @@ public:
   //-------------------------------------------------------------------------
 
   // private
-  class U_I18N_API AngleFunc : public UMemory {
+  class AngleFunc : public UMemory {
   public:
     virtual double eval(CalendarAstronomer&) = 0;
+    virtual ~AngleFunc();
   };
   friend class AngleFunc;
 
   UDate timeOfAngle(AngleFunc& func, double desired,
                     double periodDays, double epsilon, UBool next);
 
-  class U_I18N_API CoordFunc : public UMemory {
+  class CoordFunc : public UMemory {
   public:
     virtual void eval(Equatorial& result, CalendarAstronomer&) = 0;
+    virtual ~CoordFunc();
   };
   friend class CoordFunc;
 
@@ -666,44 +668,6 @@ public:
   // Other utility methods
   //-------------------------------------------------------------------------
 private:
-  /***
-   * Given 'value', add or subtract 'range' until 0 <= 'value' < range.
-   * The modulus operator.
-   */
-  inline static double normalize(double value, double range)  {
-    return value - range * Math::floorDivide(value, range);
-  }
-
-  /**
-   * Normalize an angle so that it's in the range 0 - 2pi.
-   * For positive angles this is just (angle % 2pi), but the Java
-   * mod operator doesn't work that way for negative numbers....
-   */
-  inline static double norm2PI(double angle)  {
-    return normalize(angle, CalendarAstronomer::PI * 2.0);
-  }
-
-  /**
-   * Normalize an angle into the range -PI - PI
-   */
-  inline static  double normPI(double angle)  {
-    return normalize(angle + PI, CalendarAstronomer::PI * 2.0) - PI;
-  }
-
-  /**
-   * Find the "true anomaly" (longitude) of an object from
-   * its mean anomaly and the eccentricity of its orbit.  This uses
-   * an iterative solution to Kepler's equation.
-   *
-   * @param meanAnomaly   The object's longitude calculated as if it were in
-   *                      a regular, circular orbit, measured in radians
-   *                      from the point of perigee.
-   *
-   * @param eccentricity  The eccentricity of the orbit
-   *
-   * @return The true anomaly (longitude) measured in radians
-   */
-  double trueAnomaly(double meanAnomaly, double eccentricity);
 
   /**
    * Return the obliquity of the ecliptic (the angle between the ecliptic
@@ -738,16 +702,16 @@ private:
   // of this object, so the clearCache method is provided.
   //
 
-  double    julianDay       ;
-  double    julianCentury   ;
-  double    sunLongitude    ;
-  double    meanAnomalySun  ;
-  double    moonLongitude   ;
-  double    moonEclipLong   ;
-  double    meanAnomalyMoon ;
-  double    eclipObliquity  ;
-  double    siderealT0      ;
-  double    siderealTime    ;
+  double    julianDay;
+  double    julianCentury;
+  double    sunLongitude;
+  double    meanAnomalySun;
+  double    moonLongitude;
+  double    moonEclipLong;
+  double    meanAnomalyMoon;
+  double    eclipObliquity;
+  double    siderealT0;
+  double    siderealTime;
 
   void clearCache();
 
@@ -757,7 +721,7 @@ private:
   /**
    * @internal
    */
-  UDate local(UDate localMillis);
+//  UDate local(UDate localMillis);
 };
 
 U_NAMESPACE_END
@@ -770,7 +734,7 @@ U_NAMESPACE_BEGIN
  * Cache of month -> julian day
  * @internal
  */
-class U_I18N_API CalendarCache : public UMemory {
+class CalendarCache : public UMemory {
 public:
   static int32_t get(CalendarCache** cache, int32_t key, UErrorCode &status);
   static void put(CalendarCache** cache, int32_t key, int32_t value, UErrorCode &status);