From 2c1112658eda2d58c3387df213606e6aa69f8b92 Mon Sep 17 00:00:00 2001 From: Carsten Niehaus Date: Tue, 17 Oct 2006 13:55:41 +0000 Subject: [PATCH] fix logic here, I was doing it the wrong way around svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=596434 --- libscience/spectrum.cpp | 5 +---- libscience/spectrum.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/libscience/spectrum.cpp b/libscience/spectrum.cpp index d3c1b0c..0793ed9 100644 --- a/libscience/spectrum.cpp +++ b/libscience/spectrum.cpp @@ -18,7 +18,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "spectrum.h" - #include "element.h" #include @@ -77,12 +76,10 @@ void Spectrum::adjustIntensities() //check if an adjustment is needed or not if ( maxInt == 1000 ) return; - const double max = ( double ) maxInt; - //now adjust the intensities. foreach ( Spectrum::peak * p, m_peaklist) { - double newInt = max*1000/p->intensity; + double newInt = p->intensity*1000/maxInt; p->intensity = ( int ) round( newInt ); } diff --git a/libscience/spectrum.h b/libscience/spectrum.h index cf06565..5f64103 100644 --- a/libscience/spectrum.h +++ b/libscience/spectrum.h @@ -24,7 +24,6 @@ #include #include -#include class Element; -- 2.47.3