//===================================== class Vector2d //===================================== >> This class is to store and manipulate > and ordered pair of coordinates ----------- Type: Value ----------- ------------- Group: Common ------------- ------------- Constructors: ------------- Vector2d(); ----------- Properties: ----------- float x; The x coordinate of the ordered pair float y; The y coordinate of the ordered pair -------- Methods: -------- float length() const; Function: Compute the length of the vector Arguments: N/A Returns: the length (magnitude) of the vector Vector2d normalize() const; Function: Compute a normalized version of the vector Arguments: N/A Returns: the normalized version of the vector float distanceTo( const Vector2d v ) const; Function: Treating both vectors as points in 2d space, compute the magnitude of the distance between the two Arguments: The other vector to measure the distance to Returns: the distance between the two vectors float dot( const Vector2d v ) const; Function: Compute the dot product between the two vectors. The dot product is a scalar and it represents the angle between the two vectors Arguments: The other vector Returns: the dot product of the two vectors