Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static boolean isTouchFlick(float[] startPoints, float[] endPoint) {
        return isTouchFlick(50, startPoints, endPoint);
    }

    public static boolean isTouchFlick(float baseDistance, float[] startPoints, float[] endPoint) {

        float xDistance = endPoint[0] - startPoints[0];
        float yDistance = endPoint[1] - startPoints[1];

        if (Math.abs(xDistance) < baseDistance && Math.abs(yDistance) < baseDistance) {
            return false;
        }
        return true;
    }
}