minesweeper/include/Vector2.h
TheRedBlueCube3 961d62ce7d initial commit
forgot the makefiles

forgor the readme

makefile crap yet again

sss
2025-06-25 20:41:39 +03:00

48 lines
867 B
C

#pragma once
struct Vector2
{
/**
* The position vector.
*/
int x, y;
/**
* The Vector2 initializer.
*/
Vector2(int x = 0, int y = 0);
/**
* Addition.
*/
Vector2 operator+(const Vector2 &other) const;
/**
* Subtraction.
*/
Vector2 operator-(const Vector2 &other) const;
/**
* Multiplication (by scalar).
*/
Vector2 operator*(float scalar) const;
/**
* Division (by scalar).
*/
Vector2 operator/(float scalar) const;
/**
* Addition.
*/
Vector2 &operator+=(const Vector2 &other);
/**
* Subtraction.
*/
Vector2 &operator-=(const Vector2 &other);
/**
* Multiplication (by scalar).
*/
Vector2 &operator*=(float scalar);
/**
* Division (by scalar).
*/
Vector2 &operator/=(float scalar);
};