Public Member Functions | |
| Coord2D (double X, double Y) | |
| Simple constructor. | |
| Coord2D (Coord2D *coord) | |
| Clone constructor. | |
| bool | equals (Coord2D *other) |
| Equality with other. | |
| double | distanceTo (Coord2D *other) |
| Calculate the distance to another. | |
| double | angleTo (Coord2D *other) |
| Return the angle in radians that a line passing through self and other makes with the X Axis Ensure the result falls in the range 0<=ang<2*PI. | |
| Coord2D * | subtract (Coord2D *another) |
| Subtract another from self and return the result as a new coordinate. | |
| Coord2D * | add (Coord2D *another) |
| Add another to self and return the result as a new coordinate. | |
| Coord2D * | multiply (Coord2D *another) |
| Multiply self by another and return the results as a new coordinate. | |
| Coord2D * | multiply (double other) |
| Multiply self by the passed double value and return the result as a new coord. | |
| Coord2D * | divide (Coord2D *another) |
| Divide self by another and return the results as a new coordinate. | |
| Coord2D * | divide (double other) |
| Divide self by the passed double value and return the result as a new coord. | |
| double | cross (Coord2D *another) |
| Return the cross product of self and another. | |
| double | absSquared () |
| Returns the squares of all ordinates i.e. | |
| double | abs () |
| Returns the square root of the squares of all ordinates i.e. | |
| double | angleOf () |
| Return angle of normalized coord2 where -pi <= t <= pi. | |
Public Attributes | |
| double | x |
| The x ordinate. | |
| double | y |
| The y ordinate. | |
|
|
Returns the square root of the squares of all ordinates i.e. the distance between self and the origin |
|
|
Returns the squares of all ordinates i.e. the square of distance between self and the origin |
1.4.6-NO