qiAccurate2 static method

double qiAccurate2(
  1. double jd
)

Implementation

static double qiAccurate2(double jd) {
  double d = math.pi / 12;
  double w = ((jd + 293) / 365.2422 * 24).floorToDouble() * d;
  double a = qiAccurate(w);
  if (a - jd > 5) {
    return qiAccurate(w - d);
  }
  if (a - jd < -5) {
    return qiAccurate(w + d);
  }
  return a;
}