Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.awt.*;

public class Main {
    public static double getBearing(Point posTo, Point posFrom) {
        double x = posTo.getX() - posFrom.getX();
        double y = posTo.getY() - posFrom.getY();

        return Math.atan2(x, y);
    }
}