| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* |
|
2
|
|
|
|
|
|
|
*+ |
|
3
|
|
|
|
|
|
|
* Name: |
|
4
|
|
|
|
|
|
|
* palRanorm |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
* Purpose: |
|
7
|
|
|
|
|
|
|
* Reduce angle to be within [0, 2*pi) (single precision) |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
* Language: |
|
10
|
|
|
|
|
|
|
* Starlink ANSI C |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
* Type of Module: |
|
13
|
|
|
|
|
|
|
* Library routine |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
* Invocation: |
|
16
|
|
|
|
|
|
|
* float palRanorm ( float angle ); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
* Arguments: |
|
19
|
|
|
|
|
|
|
* angle = float (Given) |
|
20
|
|
|
|
|
|
|
* Angle to be reduced (radians) |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
* Description: |
|
23
|
|
|
|
|
|
|
* The result is "angle" expressed in the range 0 to 2*pi. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
* Authors: |
|
26
|
|
|
|
|
|
|
* TIMJ: Tim Jenness |
|
27
|
|
|
|
|
|
|
* PTW: Patrick T. Wallace |
|
28
|
|
|
|
|
|
|
* CHJ: Christopher H. Jordan |
|
29
|
|
|
|
|
|
|
* {enter_new_authors_here} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
* History: |
|
32
|
|
|
|
|
|
|
* 2018-08-27 (CHJ): |
|
33
|
|
|
|
|
|
|
* Initial version |
|
34
|
|
|
|
|
|
|
* Adapted from the Fortran SLALIB library authored by Patrick Wallace. |
|
35
|
|
|
|
|
|
|
* {enter_further_changes_here} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
* Copyright: |
|
38
|
|
|
|
|
|
|
* Copyright (C) 1995 Rutherford Appleton Laboratory |
|
39
|
|
|
|
|
|
|
* All Rights Reserved. |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
* Licence: |
|
42
|
|
|
|
|
|
|
* This program is free software; you can redistribute it and/or |
|
43
|
|
|
|
|
|
|
* modify it under the terms of the GNU General Public License as |
|
44
|
|
|
|
|
|
|
* published by the Free Software Foundation; either version 3 of |
|
45
|
|
|
|
|
|
|
* the License, or (at your option) any later version. |
|
46
|
|
|
|
|
|
|
* |
|
47
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be |
|
48
|
|
|
|
|
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied |
|
49
|
|
|
|
|
|
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
50
|
|
|
|
|
|
|
* PURPOSE. See the GNU General Public License for more details. |
|
51
|
|
|
|
|
|
|
* |
|
52
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License |
|
53
|
|
|
|
|
|
|
* along with this program; if not, write to the Free Software |
|
54
|
|
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
55
|
|
|
|
|
|
|
* MA 02110-1301, USA. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
* Bugs: |
|
58
|
|
|
|
|
|
|
* {note_any_bugs_here} |
|
59
|
|
|
|
|
|
|
*- |
|
60
|
|
|
|
|
|
|
*/ |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#include |
|
63
|
|
|
|
|
|
|
#include "pal.h" |
|
64
|
|
|
|
|
|
|
#include "palmac.h" |
|
65
|
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
float palRanorm ( float angle ) { |
|
67
|
|
|
|
|
|
|
float reduced; |
|
68
|
0
|
|
|
|
|
|
reduced = fmodf(angle, PAL__D2PI); |
|
69
|
0
|
0
|
|
|
|
|
if (reduced < 0.0) reduced += PAL__D2PI; |
|
70
|
0
|
|
|
|
|
|
return reduced; |
|
71
|
|
|
|
|
|
|
} |