Return to Index

PointF

A storage unit for floating point x and y coordinates. The x and y coordinates can be accessed directly. For example:
   PointF pt;
   pt.x = 1.98;
   pt.y = 2.23;


Method Summary:
PointF::PointF();
PointF::PointF(double x, double y);
void PointF::set(double x, double y);
double PointF::distance(const PointF& p1, const PointF& p2);
double PointF::distanceTo(const PointF& p1);



PointF::PointF
PointF::PointF();

Constructs a new point with double precision coordinates.

PointF::PointF
PointF::PointF(double x, double y);

Constructs a new PointF with the specified x and y values.
Parameters:
double xThe X-value.
double yThe Y-value.

void PointF::set
void PointF::set(double x, double y);

Sets the x and y values.
Parameters:
double xThe X-value.
double yThe Y-value.

double PointF::distance
double PointF::distance(const PointF& p1, const PointF& p2);

Calculates the distance between the two points. Note that this is a static function.
Parameters:
const PointF& p1The first point.
const PointF& p2The second point.

double PointF::distanceTo
double PointF::distanceTo(const PointF& p1);

Calculates the distance to the given point.
Parameters:
const PointF& p1The point.


Generated automatically by docgen 0.0.1
© 2003 Aron Dobos