// ========================================================================== // $Id: vector2d.h,v 1.1 2011/10/19 03:24:41 jlang Exp $ // CSI2372 example Code for lecture 4 // ========================================================================== // (C)opyright: // // Jochen Lang // SITE, University of Ottawa // 800 King Edward Ave. // Ottawa, On., K1N 6N5 // Canada. // http://www.site.uottawa.ca // // Creator: jlang (Jochen Lang) // Email: jlang@site.uottawa.ca // ========================================================================== // $Log: vector2d.h,v $ // Revision 1.1 2011/10/19 03:24:41 jlang // Added code for lecture 7 // // Revision 1.1 2011/10/16 02:51:42 jlang // Added files for lecture 06 // // ========================================================================== #include #include #include "point2d.h" class Vector2D : public Point2D { double d_length; public: Vector2D(double _x=0.0, double _y=0.0); Vector2D(const Point2D& _pt ); Vector2D add( const Vector2D& _oPoint ) const; Vector2D subtract( const Vector2D& _oPoint ) const; Vector2D scale( double _scaling ) const; Vector2D normalize() const; double dot( const Vector2D& _oPoint ) const; // getter double getLength() const; };