public double getAngle(Location location) {
        // Euclidean distance (Pythagorean theorem) - not correct when the surface is a sphere
        double latitudeDifference = location.latitude - latitude;
        double longitudeDifference = location.longitude - longitude;
        return Math.atan2(latitudeDifference, longitudeDifference);
    }
public double getAngle(Location location) {
        
        double latitudeDifference = location.latitude - latitude;
        double longitudeDifference = location.longitude - longitude;
        return Math.atan2(latitudeDifference, longitudeDifference);
    }
public double getAngle ( Location location ) { // Euclidean distance (Pythagorean theorem) - not correct when the surface is a sphere double latitudeDifference = location . latitude - latitude ; double longitudeDifference = location . longitude - longitude ; return Math . atan2 ( latitudeDifference , longitudeDifference ) ; }
The angle relative to the direction EAST.
@param location never null
@return in Cartesian coordinates
The angle relative to the direction EAST .