FACT++  1.0
pm.c
Go to the documentation of this file.
1 #include "erfa.h"
2 
3 double eraPm(double p[3])
4 /*
5 ** - - - - - -
6 ** e r a P m
7 ** - - - - - -
8 **
9 ** Modulus of p-vector.
10 **
11 ** Given:
12 ** p double[3] p-vector
13 **
14 ** Returned (function value):
15 ** double modulus
16 **
17 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
18 ** Derived, with permission, from the SOFA library. See notes at end of file.
19 */
20 {
21  return sqrt( p[0]*p[0] + p[1]*p[1] + p[2]*p[2] );
22 
23 }
24 /*----------------------------------------------------------------------
25 **
26 **
27 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
28 ** All rights reserved.
29 **
30 ** This library is derived, with permission, from the International
31 ** Astronomical Union's "Standards of Fundamental Astronomy" library,
32 ** available from http://www.iausofa.org.
33 **
34 ** The ERFA version is intended to retain identical functionality to
35 ** the SOFA library, but made distinct through different function and
36 ** file names, as set out in the SOFA license conditions. The SOFA
37 ** original has a role as a reference standard for the IAU and IERS,
38 ** and consequently redistribution is permitted only in its unaltered
39 ** state. The ERFA version is not subject to this restriction and
40 ** therefore can be included in distributions which do not support the
41 ** concept of "read only" software.
42 **
43 ** Although the intent is to replicate the SOFA API (other than
44 ** replacement of prefix names) and results (with the exception of
45 ** bugs; any that are discovered will be fixed), SOFA is not
46 ** responsible for any errors found in this version of the library.
47 **
48 ** If you wish to acknowledge the SOFA heritage, please acknowledge
49 ** that you are using a library derived from SOFA, rather than SOFA
50 ** itself.
51 **
52 **
53 ** TERMS AND CONDITIONS
54 **
55 ** Redistribution and use in source and binary forms, with or without
56 ** modification, are permitted provided that the following conditions
57 ** are met:
58 **
59 ** 1 Redistributions of source code must retain the above copyright
60 ** notice, this list of conditions and the following disclaimer.
61 **
62 ** 2 Redistributions in binary form must reproduce the above copyright
63 ** notice, this list of conditions and the following disclaimer in
64 ** the documentation and/or other materials provided with the
65 ** distribution.
66 **
67 ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
68 ** the International Astronomical Union nor the names of its
69 ** contributors may be used to endorse or promote products derived
70 ** from this software without specific prior written permission.
71 **
72 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
73 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
74 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
75 ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
76 ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
77 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
78 ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
79 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
80 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
81 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
82 ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
83 ** POSSIBILITY OF SUCH DAMAGE.
84 **
85 */
double eraPm(double p[3])
Definition: pm.c:3