The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Pages
src
VecLen3.c
Go to the documentation of this file.
1
/************************************************************************/
2
/**
3
4
\file VecLen3.c
5
6
\version V1.3
7
\date 07.07.14
8
\brief
9
10
\copyright (c) UCL / Dr. Andrew C. R. Martin 1996-2014
11
\author Dr. Andrew C. R. Martin
12
\par
13
Institute of Structural & Molecular Biology,
14
University College London,
15
Gower Street,
16
London.
17
WC1E 6BT.
18
\par
19
andrew@bioinf.org.uk
20
andrew.martin@ucl.ac.uk
21
22
**************************************************************************
23
24
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied
25
according to the conditions laid out in the accompanying file
26
COPYING.DOC.
27
28
The code may be modified as required, but any modifications must be
29
documented so that the person responsible can be identified.
30
31
The code may not be sold commercially or included as part of a
32
commercial product except as described in the file COPYING.DOC.
33
34
**************************************************************************
35
36
Description:
37
============
38
39
40
**************************************************************************
41
42
Usage:
43
======
44
45
**************************************************************************
46
47
Revision History:
48
=================
49
- V1.0 29.01.96 Original By: ACRM
50
- V1.1 18.06.96 Added vector routines
51
- V1.2 06.10.98 Added VecAdd3()
52
- V1.3 07.07.14 Use bl prefix for functions By: CTP
53
54
*************************************************************************/
55
/* Doxygen
56
-------
57
#GROUP Maths
58
#SUBGROUP Vectors
59
#FUNCTION blVecLen3()
60
Calculate the length of a vector
61
*/
62
/************************************************************************/
63
/* Includes
64
*/
65
#include <math.h>
66
#include "
MathType.h
"
67
68
/************************************************************************/
69
/* Defines and macros
70
*/
71
72
/************************************************************************/
73
/* Globals
74
*/
75
76
/************************************************************************/
77
/* Prototypes
78
*/
79
80
81
/************************************************************************/
82
/*>REAL blVecLen3(VEC3F Vec)
83
-------------------------
84
*/
/**
85
86
\param[in] Vec Vector
87
\return Length of vector
88
89
Calculate the length of a vector
90
91
- 18.06.96 Original By: ACRM
92
- 07.07.14 Use bl prefix for functions By: CTP
93
*/
94
REAL
blVecLen3
(
VEC3F
Vec)
95
{
96
return
((
REAL
)sqrt((
double
)((Vec.
x
* Vec.
x
) +
97
(Vec.
y
* Vec.
y
) +
98
(Vec.
z
* Vec.
z
))));
99
}
100
101
VEC3F::x
REAL x
Definition:
MathType.h:70
VEC3F
Definition:
MathType.h:69
REAL
double REAL
Definition:
MathType.h:67
blVecLen3
REAL blVecLen3(VEC3F Vec)
Definition:
VecLen3.c:94
MathType.h
Type definitions for maths.
VEC3F::z
REAL z
Definition:
MathType.h:70
VEC3F::y
REAL y
Definition:
MathType.h:70
Generated on Tue Oct 24 2017 10:57:17 for Bioplib by
1.8.8