Loading...
Searching...
No Matches
PLMD::Angle Class Reference

Class to compute angles. More...

#include <Angle.h>

Static Public Member Functions

template<typename T>
static T compute (const VectorTyped< T, 3 > v1, const VectorTyped< T, 3 > v2)
 Compute the angle between vectors v1 and v2.
 
template<typename T>
static T compute (const VectorTyped< T, 3 > v1, const VectorTyped< T, 3 > v2, VectorTyped< T, 3 > &d1, VectorTyped< T, 3 > &d2)
 Compute the angle between vectors v1 and v2 and its derivatives wrt v1 and v2.
 

Detailed Description

Class to compute angles.

I define it as a class even if it does not contain anything. The reason is that in the future I would like to extend it to contain options about how the calculation should be done. So, for now use it as Angle a; double angle=a.compute(v1,v2); I know it is a bit misleading. If we really do not need to store "options" inside the Angle class, we can remove it later and write compute as a static function.

Member Function Documentation

◆ compute() [1/2]

template<typename T>
static T PLMD::Angle::compute ( const VectorTyped< T, 3 > v1,
const VectorTyped< T, 3 > v2 )
inlinestatic

Compute the angle between vectors v1 and v2.

◆ compute() [2/2]

template<typename T>
static T PLMD::Angle::compute ( const VectorTyped< T, 3 > v1,
const VectorTyped< T, 3 > v2,
VectorTyped< T, 3 > & d1,
VectorTyped< T, 3 > & d2 )
inlinestatic

Compute the angle between vectors v1 and v2 and its derivatives wrt v1 and v2.


The documentation for this class was generated from the following file: