<commit_before>#ifndef VEHICLEGLWIDGET_H
#define VEHICLEGLWIDGET_H

#include <QGLWidget>
#include <QVector3D>
#include "MeasuredTimer.h"

struct Vehicle
{
	Vehicle() :
		velocity(0),
		angle(0)
	{
	}
	QVector3D pos;
	float velocity;
	float angle;
};

struct KeyPad
{
	bool accelerator;
	bool brake;
	bool left;
	bool right;
};

class VehicleGLWidget : public QGLWidget
{
	Q_OBJECT

	MeasuredTimer timer;
	KeyPad pad;
	Vehicle car;
public:
	VehicleGLWidget(QWidget* const parent = 0);
protected:
	void initializeGL();
	void paintGL();
	void resizeGL(int width, int height);
	void keyPressEvent(QKeyEvent* event);
	void keyReleaseEvent(QKeyEvent* event);
private slots:
	void tick(const float& elapsed);
};

#endif // VEHICLEGLWIDGET_H<commit_msg>Fixed 'car is initially moving' bug<commit_after>#ifndef VEHICLEGLWIDGET_H
#define VEHICLEGLWIDGET_H

#include <QGLWidget>
#include <QVector3D>
#include "MeasuredTimer.h"

struct Vehicle
{
	Vehicle() :
		velocity(0),
		angle(0)
	{
	}
	QVector3D pos;
	float velocity;
	float angle;
};

struct KeyPad
{
	bool accelerator;
	bool brake;
	bool left;
	bool right;
	KeyPad() : accelerator(false), brake(false), left(false), right(false) {}
};

class VehicleGLWidget : public QGLWidget
{
	Q_OBJECT

	MeasuredTimer timer;
	KeyPad pad;
	Vehicle car;
public:
	VehicleGLWidget(QWidget* const parent = 0);
protected:
	void initializeGL();
	void paintGL();
	void resizeGL(int width, int height);
	void keyPressEvent(QKeyEvent* event);
	void keyReleaseEvent(QKeyEvent* event);
private slots:
	void tick(const float& elapsed);
};

#endif // VEHICLEGLWIDGET_H
{'fraction_non_alphanumeric': 0.10964083175803403, 'fraction_numerical': 0.00630119722747322, 'mean_word_length': 5.455284552845528, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3355549', 'n_tokens_mistral': 617, 'n_tokens_neox': 594, 'n_words': 151}