IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6b237f7c authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

format

parent 2af74c69
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,8 @@ namespace corsika { ...@@ -54,8 +54,8 @@ namespace corsika {
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline FourVector<TTimeType, TSpaceVecType>& inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
FourVector<TTimeType, TSpaceVecType>::operator+=(FourVector const& b) { operator+=(FourVector const& b) {
timeLike_ += b.timeLike_; timeLike_ += b.timeLike_;
spaceLike_ += b.spaceLike_; spaceLike_ += b.spaceLike_;
...@@ -63,39 +63,39 @@ namespace corsika { ...@@ -63,39 +63,39 @@ namespace corsika {
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline FourVector<TTimeType, TSpaceVecType>& inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
FourVector<TTimeType, TSpaceVecType>::operator-=(FourVector const& b) { operator-=(FourVector const& b) {
timeLike_ -= b.timeLike_; timeLike_ -= b.timeLike_;
spaceLike_ -= b.spaceLike_; spaceLike_ -= b.spaceLike_;
return *this; return *this;
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline FourVector<TTimeType, TSpaceVecType>& inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
FourVector<TTimeType, TSpaceVecType>::operator*=(double const b) { operator*=(double const b) {
timeLike_ *= b; timeLike_ *= b;
spaceLike_ *= b; spaceLike_ *= b;
return *this; return *this;
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline FourVector<TTimeType, TSpaceVecType>& inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
FourVector<TTimeType, TSpaceVecType>::operator/=(double const b) { operator/=(double const b) {
timeLike_ /= b; timeLike_ /= b;
spaceLike_.getComponents() /= b; spaceLike_.getComponents() /= b;
return *this; return *this;
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline FourVector<TTimeType, TSpaceVecType>& inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
FourVector<TTimeType, TSpaceVecType>::operator/(double const b) { operator/(double const b) {
*this /= b; *this /= b;
return *this; return *this;
} }
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline typename FourVector<TTimeType, TSpaceVecType>::norm_type inline typename FourVector<TTimeType, TSpaceVecType>::norm_type
FourVector<TTimeType, TSpaceVecType>::operator*(FourVector const& b) { FourVector<TTimeType, TSpaceVecType>::operator*(FourVector const& b) {
if constexpr (std::is_same<time_type, decltype(std::declval<space_type>() / meter * if constexpr (std::is_same<time_type, decltype(std::declval<space_type>() / meter *
second)>::value) second)>::value)
return timeLike_ * b.timeLike_ * constants::cSquared - spaceLike_.norm(); return timeLike_ * b.timeLike_ * constants::cSquared - spaceLike_.norm();
......
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