home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
- ** We want to stay inside the first turn of the circle, so we want that **
- ** 0 deg <= val < 360 deg. **
- ** This is a combination of the old range-routine in planet and the adj360- **
- ** routine in moonphase. **
- *******************************************************************************/
- double range(val)
- double val;
- {
- do {
- if(val<0.)
- val += 360.;
- else if(val>=360.)
- val -= 360.;
- } while(val < 0. || val >= 360.);
- return(val);
- }
-