Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Vector2 Class Reference

2D Vector More...

#include <Vector2.h>

List of all members.

Public Methods

 Vector2 (void)
 Vector2 (double x, double y)
const double & x (void) const
const double & y (void) const
double & x (void)
double & y (void)
double distance_to (const Vector2 &) const
const Vector2 & operator+= (const Vector2 &)
 Adds the given Vector2 to this one.

Vector2 operator+ (const Vector2 &) const
Vector2 operator- (const Vector2 &) const
Vector2 operator * (double) const
Vector2 operator/ (double) const

Private Attributes

double m_x
double m_y


Detailed Description

2D Vector


Constructor & Destructor Documentation

Vector2::Vector2 void    [inline]
 

Vector2::Vector2 double    x,
double    y
[inline]
 


Member Function Documentation

double Vector2::distance_to const Vector2 &    p const
 

Returns:
Returns the distance from this point to the given point,

Vector2 Vector2::operator * double    mul const
 

Returns:
Returns a Vector2 equal to this Vector2 scaled by the given factor.

Vector2 Vector2::operator+ const Vector2 &    v const [inline]
 

Returns:
Returns the sum of this Vector2 and the given one.

const Vector2 & Vector2::operator+= const Vector2 &    v [inline]
 

Adds the given Vector2 to this one.

Vector2 Vector2::operator- const Vector2 &    v const [inline]
 

Returns:
Returns the difference between this Vector2 and the given one.

Vector2 Vector2::operator/ double    div const
 

Returns:
Returns a Vector2 equal to this Vector2 scaled by the recipricol of the given factor.

double& Vector2::x void    [inline]
 

const double& Vector2::x void    const [inline]
 

double& Vector2::y void    [inline]
 

const double& Vector2::y void    const [inline]
 


Member Data Documentation

double Vector2::m_x [private]
 

double Vector2::m_y [private]
 


The documentation for this class was generated from the following files:
Generated on Sun Jul 21 11:52:18 2002 for FractalViewer by doxygen1.2.16