<commit_before>//
//  coordinate_types.h
//  GameEngine
//
//  Created by <NAME> on 2013-01-27.
//  Copyright 2013 Sharkable. All rights reserved.
//

#ifndef GAMEENGINE_COORDINATES_COORDINATETYPES_H_
#define GAMEENGINE_COORDINATES_COORDINATETYPES_H_

#include <string>

/***************************************\
 "Game" - coordinates in the game world.
\***************************************/

// Game Size

struct GameSize {
  GameSize() {}

  GameSize(float width, float height) {
    this->width = width;
    this->height = height;
  }

  float width;
  float height;
};

inline GameSize operator+(const GameSize &size_1, const GameSize &size_2) {
  return GameSize(size_1.width + size_2.width, size_1.height + size_2.height);
}

inline GameSize operator-(const GameSize &size_1, const GameSize &size_2) {
  return GameSize(size_1.width - size_2.width, size_1.height - size_2.height);
}

inline GameSize operator-(const GameSize &size) {
  return GameSize(-size.width, -size.height);
}

inline GameSize & operator+=(GameSize &size_1, const GameSize &size_2) {
  size_1.width += size_2.width;
  size_1.height += size_2.height;
  return size_1;
}

inline GameSize & operator-=(GameSize &size_1, const GameSize &size_2) {
  size_1.width -= size_2.width;
  size_1.height -= size_2.height;
  return size_1;
}


// Game Point

struct GamePoint {
  GamePoint() {}

  GamePoint(float x, float y) {
    this->x = x;
    this->y = y;
  }

  float x;
  float y;
};

inline GamePoint operator+(const GamePoint &point_1, const GamePoint &point_2) {
  return GamePoint(point_1.x + point_2.x, point_1.y + point_2.y);
}

inline GamePoint operator-(const GamePoint &point_1, const GamePoint &point_2) {
  return GamePoint(point_1.x - point_2.x, point_1.y - point_2.y);
}

inline GamePoint operator-(const GamePoint &point) {
  return GamePoint(-point.x, -point.y);
}

inline GamePoint & operator+=(GamePoint &point_1, const GamePoint &point_2) {
  point_1.x += point_2.x;
  point_1.y += point_2.y;
  return point_1;
}

inline GamePoint & operator-=(GamePoint &point_1, const GamePoint &point_2) {<commit_msg>Added comparison operators for GameSize and GamePoint.<commit_after>//
//  coordinate_types.h
//  GameEngine
//
//  Created by <NAME> on 2013-01-27.
//  Copyright 2013 Sharkable. All rights reserved.
//

#ifndef GAMEENGINE_COORDINATES_COORDINATETYPES_H_
#define GAMEENGINE_COORDINATES_COORDINATETYPES_H_

#include <string>

/***************************************\
 "Game" - coordinates in the game world.
\***************************************/

// Game Size

struct GameSize {
  GameSize() {}

  GameSize(float width, float height) {
    this->width = width;
    this->height = height;
  }

  float width;
  float height;
};

inline bool operator==(const GameSize &size_1, const GameSize &size_2) {
  return size_1.width == size_2.width && size_1.height == size_2.height;
}

inline GameSize operator+(const GameSize &size_1, const GameSize &size_2) {
  return GameSize(size_1.width + size_2.width, size_1.height + size_2.height);
}

inline GameSize operator-(const GameSize &size_1, const GameSize &size_2) {
  return GameSize(size_1.width - size_2.width, size_1.height - size_2.height);
}

inline GameSize operator-(const GameSize &size) {
  return GameSize(-size.width, -size.height);
}

inline GameSize & operator+=(GameSize &size_1, const GameSize &size_2) {
  size_1.width += size_2.width;
  size_1.height += size_2.height;
  return size_1;
}

inline GameSize & operator-=(GameSize &size_1, const GameSize &size_2) {
  size_1.width -= size_2.width;
  size_1.height -= size_2.height;
  return size_1;
}


// Game Point

struct GamePoint {
  GamePoint() {}

  GamePoint(float x, float y) {
    this->x = x;
    this->y = y;
  }

  float x;
  float y;
};

inline bool operator==(const GamePoint &point_1, const GamePoint &point_2) {
  return point_1.x == point_2.x && point_1.y == point_2.y;
}

inline GamePoint operator+(const GamePoint &point_1, const GamePoint &point_2) {
  return GamePoint(point_1.x + point_2.x, point_1.y + point_2.y);
}

inline GamePoint operator-(const GamePoint &point_1, const GamePoint &point_2) {
  return GamePoint(point_1.x - point_2.x, point_1.y - point_2.y);
}

inline GamePoint operator-(const GamePoint &point) {
  return GamePoint(-point.x, -point.y);
}

inline GamePoint & operator+=(GamePoint &point_1, const GamePoint &point_2) {
  point_1.x += point_2.x;
  point_1.y += point_2.y;
  return point_1;
}

inline GamePoint & operator-=(GamePoint &point_1, const GamePoint &point_2) {
{'fraction_non_alphanumeric': 0.15763873535264206, 'fraction_numerical': 0.028741985407915102, 'mean_word_length': 4.152619589977221, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '3132463', 'n_tokens_mistral': 1651, 'n_tokens_neox': 1610, 'n_words': 380}