meanAnomaly function
Mean anomaly of a binary star.
year is decimal year, t is time of periastron (decimal year),
p is period in years. Result in radians.
Implementation
double meanAnomaly(double year, double t, double p) {
final n = 2 * math.pi / p;
return mod2pi(n * (year - t));
}