Class Point2D



Represents a point that lies on the x-y plane.

Member Functions

Member Variables


Point2D(void)

Default constructor, creates a point at (0, 0).


Point2D(const Point2D &source)

Copy constructor, creates a point that's a copy of source.


Point2D(MHFloat newX, MHFloat newY)

Constructor, creates a point at the specified location.


MHFloat angleDeg(const Point2D pointTwo)

Returns the angle in degrees between this point and pointTwo. The angle is measured counterclockwise from the positive x axis.


MHFloat angleRad(const Point2D pointTwo)

Returns the angle in radians between this point and pointTwo. The angle is measured counterclockwise from the positive x axis.


MHFloat distance(const Point2D pointTwo)

Returns the distance between this point and pointTwo.


Point2D findPointRad(MHFloat distance, MHFloat angle)

Returns a point at the specified angle and distance from this point. Angle should be in radians.


MHFloat x

MHFloat y

The point's coordinates.











Back to Contents