bearingToAzimuth function
Converts any bearing angle from the north line direction (positive clockwise) and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
Implementation
num bearingToAzimuth(num bearing) {
final angle = bearing.remainder(360);
if (angle < 0) {
return angle + 360;
}
return angle;
}