Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    static public double angle(Point center, Point target) {
        double angle = Math.toDegrees(Math.atan2(target.y - center.y, target.x - center.x));

        if (angle < 0) {
            angle += 360;
        }
        return angle;

    }
}