halfpi_c

 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).
```

```
None.
```

```
CONSTANTS

```

#### Brief_I/O

```
The function returns half the value of pi.
```

```
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
```

```
None.
```

```
Error free.
```

```
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 ;

/.
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.
```

#### 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
```
`Wed Apr  5 17:54:36 2017`