<commit_before>#include "GreatCircle.h"

namespace{ //keep these constants to this file
	const float earthRad = 3958.761; //radius in miles
	const float twoPI    = 6.283185307179586476925; // one revolution in radians
}
float simplifyRadian(float ref, float val){
	ref += M_PI;
	float diff = ref - val;
	if(diff < 0.0f) diff += twoPI * ceil(diff / -twoPI);
	return ref - fmod(diff, twoPI);
}
float simplifyDegree(float ref, float val){
	ref += 180.0f;
	float diff = ref - val;
	if(diff < 0.0f) diff += 360.0f * ceil(diff / -360.0f);
	return ref - fmod(diff, 360.0f);
}
float calcHeading(Waypoint a, Waypoint b){
	float aRlat = a.radLatitude();
	float aRlng = a.radLongitude();
	float bRlat = b.radLatitude();
	float bRlng = b.radLongitude();
	float y = sin(bRlng - aRlng) * cos(bRlat);
	float x = cos(aRlat)*sin(bRlat)
					- sin(aRlat)*cos(bRlat)*cos(bRlng - aRlng);
	return toDeg(  atan2(y,x)  );<commit_msg>Cleaned up formatting<commit_after>#include "GreatCircle.h"

namespace{ //keep these constants to this file
	const float earthRad = 3958.761; //radius in miles
	const float twoPI    = 6.283185307179586476925; // one revolution in radians
}
float simplifyRadian(float ref, float val){
	ref += M_PI;
	float diff = ref - val;
	if(diff < 0.0f) diff += twoPI * ceil(diff / -twoPI);
	return ref - fmod(diff, twoPI);
}
float simplifyDegree(float ref, float val){
	ref += 180.0f;
	float diff = ref - val;
	if(diff < 0.0f) diff += 360.0f * ceil(diff / -360.0f);
	return ref - fmod(diff, 360.0f);
}
float calcHeading(Waypoint a, Waypoint b){
	float aRlat = a.radLatitude();
	float aRlng = a.radLongitude();
	float bRlat = b.radLatitude();
	float bRlng = b.radLongitude();
	float y = sin(bRlng - aRlng) * cos(bRlat);
	float x = cos(aRlat)*sin(bRlat) - sin(aRlat)*cos(bRlat)*cos(bRlng - aRlng);
	return toDeg(  atan2(y,x)  );
{'fraction_non_alphanumeric': 0.1492046077893582, 'fraction_numerical': 0.05485463521667581, 'mean_word_length': 3.9297297297297296, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1172478', 'n_tokens_mistral': 819, 'n_tokens_neox': 733, 'n_words': 194}