<commit_before>#ifndef TRIANGLESTRIPGLWIDGET_H
#define TRIANGLESTRIPGLWIDGET_H

#include "GLWidget.h"
#include <cmath>

/**
 * Draws a trapezoid on screen using a triangle strip. Strips can be thought of
 * lists of vertices, where each triangle in the list is composed of some
 * adjacent group of three vertices. The vertices are colored for easy viewing.
 * 
 * @author <NAME>, ported by <NAME>
 * 
 */

class TriangleStripGLWidget : public GLWidget
{
public:
	TriangleStripGLWidget(QWidget* parent = 0);
protected:
	void render();
};

TriangleStripGLWidget::TriangleStripGLWidget(QWidget* parent) : GLWidget(parent) {}

void TriangleStripGLWidget::render()
{
	glBegin(GL_TRIANGLE_STRIP);

	glColor3f(1, 0, 0);
	glVertex2f(0, 0);

	glColor3f(1, 1, 0);
	glVertex2f(50, 0);

	glColor3f(0, 1, 0);
	glVertex2f(25, 50);

	glColor3f(0, 1, 1);
	glVertex2f(75, 50);

	glColor3f(0, 0, 1);
	glVertex2f(50, 100);

	glEnd();
}

#endif // TRIANGLESTRIPGLWIDGET_H
<commit_msg>Put comment right next to class def<commit_after>#ifndef TRIANGLESTRIPGLWIDGET_H
#define TRIANGLESTRIPGLWIDGET_H

#include "GLWidget.h"
#include <cmath>

/**
 * Draws a trapezoid on screen using a triangle strip. Strips can be thought of
 * lists of vertices, where each triangle in the list is composed of some
 * adjacent group of three vertices. The vertices are colored for easy viewing.
 * 
 * @author <NAME>, ported by <NAME>
 * 
 */
class TriangleStripGLWidget : public GLWidget
{
public:
	TriangleStripGLWidget(QWidget* parent = 0);
protected:
	void render();
};

TriangleStripGLWidget::TriangleStripGLWidget(QWidget* parent) : GLWidget(parent) {}

void TriangleStripGLWidget::render()
{
	glBegin(GL_TRIANGLE_STRIP);

	glColor3f(1, 0, 0);
	glVertex2f(0, 0);

	glColor3f(1, 1, 0);
	glVertex2f(50, 0);

	glColor3f(0, 1, 0);
	glVertex2f(25, 50);

	glColor3f(0, 1, 1);
	glVertex2f(75, 50);

	glColor3f(0, 0, 1);
	glVertex2f(50, 100);

	glEnd();
}

#endif // TRIANGLESTRIPGLWIDGET_H

{'fraction_non_alphanumeric': 0.11993849308047155, 'fraction_numerical': 0.0451050743208611, 'mean_word_length': 5.1, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1976814', 'n_tokens_mistral': 808, 'n_tokens_neox': 749, 'n_words': 200}