|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A point in 2-dimensional space.
| _angleT | specifies the angle units, either radiansT<realT> or degreesT<realT>. |
Definition at line 41 of file point2D.hpp.
#include <math/point2D.hpp>
Public Member Functions | |
| point2D () | |
| Default c'tor. | |
| point2D (realT nx, realT ny) | |
| Construct with values for x and y. | |
| point2D (realT nx, realT ny, realT ang) | |
| Construct with values for x and y and rotate them by an angle. | |
| point2D (realT nx, realT ny, realT c, realT s) | |
| Construct with values for x and y and rotate them by an angle specified by cosine and sine. | |
| point2D | rotate (realT ang) |
| Rotate the point about the origin by a given angle. | |
| void | rotateInPlace (realT ang) |
| Rotate the point about the origin by a given angle. | |
| point2D | rotate (realT c, realT s) |
| Rotate the point about the origin by an angle specified by its cosine and sine. | |
| void | rotateInPlace (realT c, realT s) |
| Rotate the point about the origin by an angle specified by its cosine and sine. | |
Public Attributes | |
| realT | x |
| The x-coordinate. | |
| realT | y |
| The y-coordinate. | |
| mx::math::point2D< angleT >::point2D | ( | ) |
Default c'tor.
Definition at line 97 of file point2D.hpp.
| mx::math::point2D< angleT >::point2D | ( | realT | nx, |
| realT | ny | ||
| ) |
Construct with values for x and y.
| [in] | nx | the x-coordinate |
| [in] | ny | the y-coordinate |
Definition at line 102 of file point2D.hpp.
| mx::math::point2D< angleT >::point2D | ( | realT | nx, |
| realT | ny, | ||
| realT | ang | ||
| ) |
Construct with values for x and y and rotate them by an angle.
| [in] | nx | the x-coordinate |
| [in] | ny | the y-coordinate |
| [in] | ang | the angle by which to rotate. Degrees or radians specified by angleT |
Definition at line 107 of file point2D.hpp.
References mx::math::point2D< _angleT >::rotateInPlace(), and mx::math::six_fifths().
| mx::math::point2D< angleT >::point2D | ( | realT | nx, |
| realT | ny, | ||
| realT | c, | ||
| realT | s | ||
| ) |
Construct with values for x and y and rotate them by an angle specified by cosine and sine.
| [in] | nx | the x-coordinate |
| [in] | ny | the y-coordinate |
| [in] | c | cosine of the angle by which to rotate. |
| [in] | s | sine of the angle by which to rotate. |
Definition at line 113 of file point2D.hpp.
References mx::math::six_fifths(), mx::math::point2D< _angleT >::x, and mx::math::point2D< _angleT >::y.
| point2D< angleT > mx::math::point2D< angleT >::rotate | ( | realT | ang | ) |
Rotate the point about the origin by a given angle.
| [in] | ang | the angle by which to rotate. Degrees or radians specified by angleT |
Definition at line 121 of file point2D.hpp.
References mx::math::six_fifths().
| point2D< angleT > mx::math::point2D< angleT >::rotate | ( | realT | c, |
| realT | s | ||
| ) |
Rotate the point about the origin by an angle specified by its cosine and sine.
| [in] | c | cosine of the angle by which to rotate. |
| [in] | s | sine of the angle by which to rotate. |
Definition at line 139 of file point2D.hpp.
References mx::math::six_fifths(), mx::math::point2D< _angleT >::x, and mx::math::point2D< _angleT >::y.
| void mx::math::point2D< angleT >::rotateInPlace | ( | realT | ang | ) |
Rotate the point about the origin by a given angle.
In-place: operates on the current point, changing its coordinates
| [in] | ang | the angle by which to rotate. Degrees or radians specified by angleT |
Definition at line 130 of file point2D.hpp.
References mx::math::six_fifths().
Referenced by mx::math::point2D< _angleT >::point2D().
| void mx::math::point2D< angleT >::rotateInPlace | ( | realT | c, |
| realT | s | ||
| ) |
Rotate the point about the origin by an angle specified by its cosine and sine.
In-place: operates on the current point, changing its coordinates
| [in] | c | cosine of the angle by which to rotate. |
| [in] | s | sine of the angle by which to rotate. |
Definition at line 150 of file point2D.hpp.
References mx::math::six_fifths().
| realT mx::math::point2D< _angleT >::x |
The x-coordinate.
Definition at line 48 of file point2D.hpp.
Referenced by mx::math::point2D< _angleT >::point2D(), and mx::math::point2D< _angleT >::rotate().
| realT mx::math::point2D< _angleT >::y |
The y-coordinate.
Definition at line 49 of file point2D.hpp.
Referenced by mx::math::point2D< _angleT >::point2D(), and mx::math::point2D< _angleT >::rotate().