How to get the heading clockwise from north given two points

I’m trying to use this function:

public GHPoint projectCoordinate(double latInDeg, double lonInDeg, double distanceInMeter, double headingClockwiseFromNorth)

Which can be found over at:

Given a starting and a stopping point. However I have found no way in which to get the actual headingClockwiseFromNorth parameter given two GHPoints. Is there such a function in the GH Java library of GH API ? Is there and easy way to write our own function for this ? Would you guys consider adding this to the documentation of the function.

This should be possible with:

double azimuthDegree = Helper.ANGLE_CALC.calcAzimuth(0, 0, 1, 1);
Helper.DIST_EARTH.projectCoordinate(2, 2, 10, azimuthDegree);

the problem is that calcAzimuth is not yet public - in our use case the heading is given from the user. Why would you need to calculate a third point if you already have 2?

Would you guys consider adding this to the documentation of the function.

This is always improvable. If you think something is wrong, do not hesitate to submit a pull request.

BTW: please avoid the limiting ‘guys’, which just speaks to male people