![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Functor returning the cosine of the angle between two vectors (optionally clamped to [-1, 1]).
More...
#include <Functional.hpp>
Inheritance diagram for CDPL::Math::VectorAngleCosine< V1, V2, T >:Public Types | |
| typedef CommonType< typename VectorInnerProduct< V1, V2 >::ResultType, T >::Type | ResultType |
Public Types inherited from CDPL::Math::VectorScalarBinaryFunctor< V1, V2 > | |
| typedef CommonType< typename V1::ValueType, typename V2::ValueType >::Type | ResultType |
| The scalar result type (common type of the two vector element types). More... | |
Static Public Member Functions | |
| static ResultType | apply (const VectorExpression< V1 > &e1, const VectorExpression< V2 > &e2, const T &sd, bool clamp) |
| Returns the cosine of the angle between e1 and e2. More... | |
Functor returning the cosine of the angle between two vectors (optionally clamped to [-1, 1]).
| V1 | The first vector expression type. |
| V2 | The second vector expression type. |
| T | The norm-product scalar type. |
| typedef CommonType<typename VectorInnerProduct<V1, V2>::ResultType, T>::Type CDPL::Math::VectorAngleCosine< V1, V2, T >::ResultType |
|
inlinestatic |
Returns the cosine of the angle between e1 and e2.
| e1 | The first vector expression. |
| e2 | The second vector expression. |
| sd | The precomputed product \( \|e_1\| \cdot \|e_2\| \) of the two vector magnitudes. |
| clamp | If true, the result is clamped to the range [-1, 1]. |