lastIntensity retrieved once, saving additional loop cycle
@@ -117,8 +117,8 @@ public class FeatureDataUtils {
float area = 0f;
DoubleBuffer intensities = series.getIntensityValues();
List<? extends Scan> scans = series.getSpectra();
- double lastIntensity = 0d;
- for (int i = 0; i < series.getNumberOfValues(); i++) {
+ double lastIntensity = intensities.get(0);
+ for (int i = 1; i < series.getNumberOfValues(); i++) {
final double thisIntensity = intensities.get(i);
final float lastRT = scans.get(i - 1).getRetentionTime();
final float thisRT = scans.get(i).getRetentionTime();
