#ifndef VECTOR2D_H #define VECTOR2D_H class Vector2D { private: double x, y; public: Vector2D () { x = y = 0;}; // constructores simples los pongo inline Vector2D (double x, double y) { // constructores simples los pongo inline 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 }; #endif