SpiceDouble halfpi_c ( void )
Return half the value of pi (the ratio of the circumference of
a circle to its diameter).
None.
CONSTANTS
The function returns half the value of pi.
None.
The function returns half the value of pi (the ratio of
a circle's circumference to its diameter), determined by
the ACOS function. That is,
halfpi_c = acos ( -1.0 ) * 0.50
None.
Error free.
None.
The first time the function is referenced, the value is computed
as shown above. The value is saved, and returned directly upon
subsequent reference.
The subroutine shown below illustrates the use of halfpi_c.
void bftran ( ra, dec, w, tipm )
{
/.
Compute the transformation from inertial to body
fixed coordinates, given the directions of the north
pole and prime meridian of the body.
./
SpiceDouble ra;
SpiceDouble dec;
SpiceDouble w;
SpiceDouble tipm [3][3];
/.
The transformation is defined by the compund
rotation
[W] [pi/2 - Dec] [RA + pi/2]
3 1 3
./
rotate_c ( ra + halfpi_c(), 3, tipm );
rotmat_c ( tipm, halfpi_c() - dec, 1, tipm );
rotmat_c ( tipm, w, 3, tipm );
}
None.
None.
W.L. Taber (JPL)
I.M. Underwood (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
half the value of pi
Link to routine halfpi_c source file halfpi_c.c
|