#ifndef VECTOR2D_P4_H #define VECTOR2D_P4_H class Vector2D { private: double x, y; public: Vector2D () { x = y = 0;}; Vector2D (double x, double y) { this->x = x; this->y = y; }; Vector2D operator+(const Vector2D &v) const; // suma de vectores. double module() const; // retorna la magnitud de un vector. Vector2D unitary() const; // retorna un vector de magnitud 1 e igual dirección. friend Vector2D operator*(double scalar, const Vector2D &v); // multiplicación escalar por vector double getX() { return x;}; double getY() { return y;}; Vector2D operator/ (double f); }; #endif