IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 7ae5cde5 authored by Nikos Karastathis's avatar Nikos Karastathis :ocean:
Browse files

Scalar multiplication in Vectors

parent 10727ecb
No related branches found
No related tags found
No related merge requests found
......@@ -238,4 +238,12 @@ namespace corsika {
return os;
}
/*
* scalar * vector multiplication
*/
template <typename TDimension>
inline Vector<TDimension> operator*(double const n, Vector<TDimension> const& vec) {
return vec * n;
}
} // namespace corsika
......@@ -142,6 +142,9 @@ namespace corsika {
auto dot(Vector<TDimension2> const& pV) const;
};
template <typename TDimension>
Vector<TDimension> operator*(double const n, Vector<TDimension> const& vec);
} // namespace corsika
#include <corsika/detail/framework/geometry/Vector.inl>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment