campo-sirio/gfm/ddeg.c

47 lines
758 B
C
Raw Normal View History

/* DEC *ConvRadiansToDegrees(deg, rad);
*
* ARGUMENT
* DEC *deg;
* DEC *rad;
*
* DESCRIPTION
* Converts an angle rad, in radians, to degrees,
* storing the result in deg.
*
* SIDE EFFECTS
* None.
*
* RETURNS
* rad if successful, otherwise GM_NULL
*
* POSSIBLE ERRORS
* GM_NULLPOINTER
* GM_INIT
* GM_OVERFLOW
*
* AUTHOR
* Jared Levy
* Copyright (C) 1988-1990 Greenleaf Software Inc. All rights reserved.
*
* MODIFICATIONS
*
*
*/
#include <stdio.h>
#include "gmsystem.h"
DEC *ConvRadiansToDegrees(deg, rad)
DEC *deg;
DEC *rad;
{
int i;
_MacStart(GM_DDEG);
i = _MulDec80Bit( deg, &dec180OverPi, rad );
if ( i != GM_SUCCESS ) {
_MacErr( i );
_MacRet( GM_NULL );
}
(void) _Sq5UnsTo4Uns( deg );
_MacRet( deg );
}