1
0
Fork 0

Added modulo function

pull/2/head
Cees Bassa 2015-04-16 10:01:44 +02:00
parent feb59c47c3
commit f8be35ff91
1 changed files with 9 additions and 0 deletions

View File

@ -172,6 +172,15 @@ orbit_t classel(int ep_year,double ep_day,xyz_t r,xyz_t v)
return orb;
}
// Return x modulo y [0,y)
double modulo(double x,double y)
{
x=fmod(x,y);
if (x<0.0) x+=y;
return x;
}
orbit_t rv2el(int satno,double mjd,xyz_t r0,xyz_t v0)
{
int i,imode;