<commit_before>#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define PI 3.14159265

using namespace std;

class Coord {
	public:
		float x, y;

	Coord (float a, float b) {
		x = a;
		y = b;
	}
};

bool areFloatValuesSimilar (float a, float b) {
	return abs (a - b) < 5.0f;
}

float computeAngle (Coord mid, Coord left, Coord right) {

}

vector< float > getInteriorAngles (vector< Coord >& coords) {
	vector< float > angles = vector< float > ();
	const unsigned int numOfCoords = coords.size ();

	// First point is a special case, handle it differently
	// For rest of points, take the point, take 1 before it & 1 after it & compute angle (after gradients)

	angles.push_back (computeAngle(coords [0], coords [1], coords [numOfCoords - 2]));

	for (int i = 1; i < numOfCoords - 1; i++) {
		angles.push_back (computeAngle (coords [i], coords [i-1], coords [i+1]));
	}

	return angles;
}
<commit_msg>computeAngle()<commit_after>#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define PI 3.14159265

using namespace std;

class Coord {
	public:
		float x, y;

	Coord (float a, float b) {
		x = a;
		y = b;
	}
};

bool areFloatValuesSimilar (float a, float b) {
	return abs (a - b) < 5.0f;
}

float computeAngle (Coord mid, Coord left, Coord right) {
	const float deg = 180.0f / PI;
	float gradML = (left.y - mid.y) / (left.x - mid.x),
		gradMR = (mid.y - right.y) / (mid.x - right.x);
	float thetaML = atan (gradML) * deg, thetaMR = atan (gradMR) * deg;
	float angle = abs (thetaML - thetaMR);

	return min (angle, 180 - angle);
}

vector< float > getInteriorAngles (vector< Coord >& coords) {
	vector< float > angles = vector< float > ();
	const unsigned int numOfCoords = coords.size ();

	// First point is a special case, handle it differently
	// For rest of points, take the point, take 1 before it & 1 after it & compute angle (after gradients)

	angles.push_back (computeAngle(coords [0], coords [1], coords [numOfCoords - 2]));

	for (int i = 1; i < numOfCoords - 1; i++) {
		angles.push_back (computeAngle (coords [i], coords [i-1], coords [i+1]));
	}

	return angles;
}

{'fraction_non_alphanumeric': 0.14279197080291972, 'fraction_numerical': 0.02144160583941606, 'mean_word_length': 3.6659574468085108, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 22, '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': '3451238', 'n_tokens_mistral': 842, 'n_tokens_neox': 783, 'n_words': 275}