#pragma once
#include <iostream>
#include "Vector3.h"

class Vector2
{
public:
	float data[2];
	Vector2();
	Vector2(float x, float y);
	~Vector2(void);

	float* getData();

	void print() const;

	bool operator==(Vector2 other) const;

	float& operator[](int ind);
	
	Vector2 operator*(float scale) const;
	Vector2& operator*=(float scale);

	Vector2 operator*(Vector2 other) const;
	Vector2& operator*=(Vector2 other);

	Vector2 operator/(float scale) const;
	Vector2& operator/=(float scale);

	Vector2 operator/(Vector2 other) const;
	Vector2& operator/=(Vector2 other);

	Vector2 operator+(Vector2 add) const;
	Vector2& operator+=(Vector2 add);

	Vector2 operator-(Vector2 sub) const;
	Vector2& operator-=(Vector2 sub);

	Vector2 operator-() const;
	
};

namespace boost
{
	namespace serialization
	{
		// Vector2
		template<class Archive>
		void serialize(Archive & ar, Vector2 & vector, const unsigned int version)
		{
			ar & vector.data;
		}
	}
}