You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vector2d.h 756B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef VECTOR2D_H
  2. #define VECTOR2D_H
  3. #include "vectorxd.h"
  4. typedef VectorXD<2> Vector2D;
  5. template<> class VectorXD<2> : public GenericVector<2, VectorXD<2> >
  6. {
  7. public:
  8. VectorXD<2>();
  9. VectorXD<2>(const double scalars[2]);
  10. VectorXD<2>(double x, double y);
  11. VectorXD<2>(const VectorXD<2>& other);
  12. virtual ~VectorXD<2>();
  13. double getX() const;
  14. Vector2D& setX(double x);
  15. double getY() const;
  16. Vector2D& setY(double y);
  17. using GenericVector<2, VectorXD<2> >::add;
  18. Vector2D& add(double x, double y);
  19. using GenericVector<2, VectorXD<2> >::sub;
  20. Vector2D& sub(double x, double y);
  21. using GenericVector<2, VectorXD<2> >::dotProduct;
  22. double dotProduct(double x, double y) const;
  23. };
  24. #endif // VECTOR2D_H