Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.graphics.PointF;

import java.util.List;

public class Main {
    /**
     * Search of first index of growing y.
     *
     * @param valPoints Y points, first index is searched from.
     * @return Index of first growing value.
     */
    private static int findStartIndex(List<PointF> valPoints) {
        for (int i = 0; i < valPoints.size() - 1; i++) {
            if (valPoints.get(i).y < valPoints.get(i + 1).y) {
                return i;
            }
        }
        return -1;
    }
}