home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
educ
/
planets709.lha
/
range.c
< prev
next >
Wrap
Text File
|
1992-08-05
|
676b
|
18 lines
/*******************************************************************************
** 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);
}