IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 14eba275 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

moved sgn function into separate file for reuse

parent f6b02511
No related branches found
No related tags found
1 merge request!100Resolve "Low energy hadronic interactions: UrQMD interface"
......@@ -27,6 +27,7 @@ set (
COMBoost.h
Bit.h
Singleton.h
sgn.h
CorsikaFenv.h
MetaProgramming.h
)
......
......@@ -14,17 +14,12 @@
#include <corsika/geometry/Vector.h>
#include <corsika/units/PhysicalUnits.h>
#include <corsika/utl/COMBoost.h>
#include <corsika/utl/sgn.h>
using namespace corsika::utl;
using namespace corsika::units::si;
using namespace corsika::geometry;
//! sign function without branches
template <typename T>
static int sgn(T val) {
return (T(0) < val) - (val < T(0));
}
COMBoost::COMBoost(FourVector<HEPEnergyType, Vector<hepmomentum_d>> const& Pprojectile,
const HEPMassType massTarget)
: fCS(Pprojectile.GetSpaceLikeComponents().GetCoordinateSystem()) {
......
#ifndef _utilities_sgn_h
#define _utilities_sgn_h
namespace corsika::utl {
//! sign function without branches
template <typename T>
static int sgn(T val) {
return (T(0) < val) - (val < T(0));
}
}
#endif
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