Index Page halfpi_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       SpiceDouble halfpi_c ( void )
#### Abstract
       Return half the value of pi (the ratio of the circumference of
       a circle to its diameter).
#### Required_Reading
       None.
#### Keywords
       CONSTANTS
#### Brief_I/O
       The function returns half the value of pi.
#### Detailed_Input
       None.
#### Detailed_Output
       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
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       The first time the function is referenced, the value is computed
       as shown above. The value is saved, and returned directly upon
       subsequent reference.
#### Examples
       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 );

                   }
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)
       E.D. Wright     (JPL)
#### Version
       -CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
#### Index_Entries
       half the value of pi
#### Link to routine halfpi_c source file halfpi_c.c

    Wed Jun  9 13:05:24 2010