From 9e9c109898c0ac6b1ca0ea55e858367db6e66d34 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Wed, 22 Feb 2017 11:31:01 +0100 Subject: [PATCH] adding cmath and std:round interp --- slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h index 22c2392c1..fa3410d73 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/energyConversion.h @@ -10,7 +10,7 @@ //#include "sls_receiver_defs.h" #include "sls_detector_defs.h" //#endif - +#include #include using namespace std; @@ -75,7 +75,7 @@ class energyConversion V linearInterpolation(const E x, const E x1, const E x2, const V y1, const V y2){ double k = static_cast(y2-y1)/(x2-x1); double m = y1-k*x1; - int y = round( k*x+m ); + int y = std::round( k*x+m ); return static_cast(y); }