|
GLAMERDOC++
Gravitational Lensing Code Library
|
Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is overridden. More...
#include <point.h>

Public Member Functions | |
| Point_2d (double x1, double x2) | |
| Point_2d (const Point_2d &p) | |
| Point_2d & | operator= (const Point_2d &p) |
| Point_2d (const PosType *p) | |
| bool | operator== (const Point_2d &p) const |
| bool | operator!= (const Point_2d &p) const |
| Point_2d | operator+ (const Point_2d &p) const |
| Point_2d | operator- (const Point_2d &p) const |
| Point_2d & | operator+= (const Point_2d &p) |
| Point_2d & | operator-= (const Point_2d &p) |
| Point_2d & | operator/= (PosType value) |
| Point_2d | operator/ (PosType value) const |
| Point_2d & | operator*= (PosType value) |
| Point_2d | operator* (PosType value) const |
| PosType | operator* (const Point_2d &p) const |
| scalar product | |
| PosType | operator^ (const Point_2d &p) const |
| outer product | |
| PosType | length () const |
| length | |
| PosType | length_sqr () const |
| length^2 | |
| void | rotate (PosType theta) |
| Point_2d | rotated (PosType theta) const |
| returns a copy of the point that it rotated | |
| void | unitize () |
| rescale to make a unit length vector | |
| Point_2d | unit () const |
| rescale to make a unit length vector | |
| PosType * | data () |
| PosType & | operator[] (size_t i) |
| const PosType & | operator[] (size_t i) const |
Public Attributes | |
| PosType | x [2] |
Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is overridden.