ftp.nice.ch/pub/next/science/astronomy/usat-NeXT.N.bs.tar.gz#/usat/fmod2p.c

This is fmod2p.c in view mode; [Download] [Up]

/************************************************/
/* fmod2p.c					*/
/*						*/
/* given an angle in radians, returns an angle	*/
/* in radians in the range of 0 to 2pi.		*/
/************************************************/

/***** description
 *
 *	$Id: fmod2p.c,v 1.1 1993/04/02 18:02:52 craig Exp $
 *
 */

/***** modification history
 *
 *	translated by f2c (version of 12 March 1993  7:07:21).
 *
 *	$Log: fmod2p.c,v $
 * Revision 1.1  1993/04/02  18:02:52  craig
 * Initial revision
 *
 *
 */

/***** include files *****/

#include "satellite.h"
#include "satproto.h"

/***** global variables *****/

extern struct MCONSTANTS mcnsts;

/**********/
/* fmod2p */
/**********/

double fmod2p (double x)
{
    /* System generated locals */

    double ret_val;

    /* Local variables */

    int i;

    ret_val = x;
    i = ret_val / mcnsts.twopi;
    ret_val -= i * mcnsts.twopi;

    if (ret_val < 0) 
    {
	ret_val += mcnsts.twopi;
    }
   
    return (ret_val);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.