source: trunk/MagicSoft/slalib/drange.c@ 3821

Last change on this file since 3821 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 597 bytes
Line 
1#include "slalib.h"
2#include "slamac.h"
3double slaDrange ( double angle )
4/*
5** - - - - - - - - - -
6** s l a D r a n g e
7** - - - - - - - - - -
8**
9** Normalize angle into range +/- pi.
10**
11** (double precision)
12**
13** Given:
14** angle double the angle in radians
15**
16** The result is angle expressed in the +/- pi (double precision).
17**
18** Defined in slamac.h: DPI, D2PI, dmod
19**
20** Last revision: 19 March 1996
21**
22** Copyright P.T.Wallace. All rights reserved.
23*/
24{
25 double w;
26
27 w = dmod ( angle, D2PI );
28 return ( fabs ( w ) < DPI ) ? w : w - dsign ( D2PI, angle );
29}
Note: See TracBrowser for help on using the repository browser.