Changeset View
Changeset View
Standalone View
Standalone View
libscience/spectrum.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 80 | { | |||
---|---|---|---|---|---|
90 | if (maxInt == 1000) { | 90 | if (maxInt == 1000) { | ||
91 | return; | 91 | return; | ||
92 | } | 92 | } | ||
93 | 93 | | |||
94 | //now adjust the intensities. | 94 | //now adjust the intensities. | ||
95 | foreach (Spectrum::peak *p, m_peaklist) { | 95 | foreach (Spectrum::peak *p, m_peaklist) { | ||
96 | double newInt = p->intensity * 1000 / maxInt; | 96 | double newInt = p->intensity * 1000 / maxInt; | ||
97 | 97 | | |||
98 | p->intensity = (int)qRound(newInt); | 98 | p->intensity = qRound(newInt); | ||
99 | } | 99 | } | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | QList<double> Spectrum::wavelengths(double min, double max) | 102 | QList<double> Spectrum::wavelengths(double min, double max) | ||
103 | { | 103 | { | ||
104 | QList<double> list; | 104 | QList<double> list; | ||
105 | 105 | | |||
106 | foreach (peak * p , m_peaklist) { | 106 | foreach (peak * p , m_peaklist) { | ||
Show All 28 Lines |