AngleFunctions.hpp
Go to the documentation of this file.
1 // ========================================================================================
2 // ApproxMVBB
3 // Copyright (C) 2014 by Gabriel Nützi <nuetzig (at) imes (d0t) mavt (d0t) ethz (døt) ch>
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 // ========================================================================================
9 
10 #ifndef ApproxMVBB_AngleFunctions_hpp
11 #define ApproxMVBB_AngleFunctions_hpp
12 
13 #include <cmath>
15 #include ApproxMVBB_TypeDefs_INCLUDE_FILE
16 namespace ApproxMVBB{
17 namespace AngleFunctions {
18 
20 
24  inline PREC mapToPi(PREC x) {
25  return x - std::floor( x/(2.0*M_PI) + 0.5 ) * M_PI * 2.0;
26  }
27 
31  inline PREC mapTo2Pi(PREC x) {
32  return x - std::floor( x/(2.0*M_PI)) * M_PI * 2.0;
33  }
34 
36  inline PREC relativeAnglePi(PREC angle, PREC angle2) {
37  return mapToPi(angle2-angle);
38  }
40  inline PREC relativeAngle2Pi(PREC angle, PREC angle2) {
41  return mapTo2Pi(angle2-angle);
42  }
43 
44 }
45 }
46 #endif // AngleFunctions_hpp
47 
48 
These are some container definitions.
PREC relativeAngle2Pi(PREC angle, PREC angle2)
PREC relativeAnglePi(PREC angle, PREC angle2)
ApproxMVBB_DEFINE_MATRIX_TYPES PREC mapToPi(PREC x)
#define ApproxMVBB_DEFINE_MATRIX_TYPES
Definition: TypeDefs.hpp:26


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Mon Jun 10 2019 12:38:08