Point::Distance

Point::Distance
inline T Distance(T x2, T y2) const;
inline T Distance(const Point<T> & pt) const;
inline T Distance() const;
Description

Distance calculates the distance between the current point and the passed point using the equation:

   sqrt( (x2-x)^2 + (y2-y)^2 )
Parameters
Parameters 
Description 
T x2 
The x coordinate of the point whose distance to the current point will be calculated. 
T y2 
The y coordinate of the point whose distance to the current point will be calculated. 
const Point<T> & pt 
A point whose x and y coordinates will function as x2 and y2 respectively in the above equation. 
Return Value

A value containing the calculated distance.