Skip to content
Snippets Groups Projects
Commit 4eeaf1f1 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

fix: template instantiation for `vector_x<edm4hep::Vector2f>`

parent 29408132
No related branches found
No related tags found
1 merge request!92fix: template instantiation for `vector_x<edm4hep::Vector2f>`
Pipeline #35362 failed
......@@ -8,6 +8,7 @@
#else
#include <cmath>
#include <edm4hep/Vector2f.h>
#include <edm4hep/Vector3f.h>
#include <eicd/Vector2f.h>
#include <eicd/Vector3f.h>
......@@ -34,11 +35,24 @@ template <>
inline auto vector_y<eicd::Vector2f>(const eicd::Vector2f& v) {
return v.b;
}
// Vector2f uses a,b instead of x,y
template <>
inline auto vector_x<edm4hep::Vector2f>(const edm4hep::Vector2f& v) {
return v.a;
}
template <>
inline auto vector_y<edm4hep::Vector2f>(const edm4hep::Vector2f& v) {
return v.b;
}
// no z-component for 2D vectors
template <>
inline auto vector_z<eicd::Vector2f>(const eicd::Vector2f& v) {
return 0;
}
template <>
inline auto vector_z<edm4hep::Vector2f>(const edm4hep::Vector2f& v) {
return 0;
}
// inline edm4hep::Vector2f VectorFromPolar(const double r, const double theta)
// {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment