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 double getAngleByTwoPostion(float[] startPoints, float[] endPoint) {
        double result = 0;

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

        result = Math.atan2((double) yDistance, (double) xDistance) * 180 / Math.PI;

        result += 270;

        return result;
    }
}