#include "Vector.h" Vec3f::Vec3f(float x, float y, float z) { this->x = x; this->y = y; this->z = z; } Vec3f::Vec3f() { this->x = 0; this->y = 0; this->z = 0; } Vec3f::Vec3f(Vec3f &other) { this->x = other.x; this->y = other.y; this->z = other.z; } float& Vec3f::operator [](int index) { return v[index]; } Vec2f::Vec2f(float x, float y) { this->x = x; this->y = y; } Vec2f::Vec2f() { this->x = 0; this->y = 0; } Vec2f::Vec2f(Vec2f &other) { this->x = other.x; this->y = other.y; } float& Vec2f::operator [](int index) { return v[index]; } Vec2f Vec2f::operator+(const Vec2f & other) { return Vec2f(x + other.x, y+other.y); }