SpiceDouble halfpi_c ( void )
Return half the value of pi (the ratio of the circumference of
a circle to its diameter).
The function returns half the value of pi.
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
The first time the function is referenced, the value is computed
as shown above. The value is saved, and returned directly upon
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 tipm ;
The transformation is defined by the compund
[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 );
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