Public Member Functions | |
double & | operator[] (const int &index) |
double & | index (const int &i) |
double | dot (const Point2D &pt) const |
double | length (void) const |
double | squareNorm (void) const |
Point2D | unit (void) const |
Point2D | negate (void) const |
Point2D | operator- (void) const |
Point2D | scale (double scl) const |
Point2D | operator * (double scale) const |
Point2D & | operator *= (double scale) |
Point2D | operator/ (double scale) const |
Point2D & | operator/= (double scale) |
Point2D | add (const Point2D &pt) const |
Point2D | operator+ (const Point2D &pt) const |
Point2D & | operator+= (const Point2D &pt) |
Point2D | subtract (const Point2D &pt) const |
Point2D | operator- (const Point2D &pt) const |
Point2D & | operator-= (const Point2D &pt) |
Point2D | mult (const Point2D &pt) const |
Point2D | operator * (const Point2D &pt) const |
Point2D & | operator *= (const Point2D &pt) |
Point2D | div (const Point2D &pt) const |
Point2D | operator/ (const Point2D &pt) const |
Point2D & | operator/= (const Point2D &pt) |
Public Attributes | |
double | p [2] |
|
This method adds two points and returns their sum. |
|
This method performs a component-wise division of two ponts and returns the ratio. |
|
This method returns the dot product of two points. |
|
This method returns the value of the indexed coefficient. |
|
This method returns the length of a point. |
|
This method performs a component-wise multiplication of two ponts and returns the product. |
|
This method return the negative of the point. |
|
This method performs a component-wise multiplication of two ponts and returns the product. |
|
This method scales a point by a constant factor and returns a new point. |
|
This method multiplies the coefficients of the current point by the coefficients of the input point. |
|
This method scales the current point by a constant factor. |
|
This method adds two points and returns their sum. |
|
This method adds a point to the current point. |
|
This method subtracts two points and returns their difference. |
|
This method return the negative of the point. |
|
This method subtracts a point from the current point. |
|
This method performs a component-wise division of two ponts and returns the ratio. |
|
This method divides the coefficients of a point by a constant factor and returns a new point. |
|
This method divides the coefficients of the current point by the coefficients of the input point. |
|
This method divides the coefficients of the current point by a constant factor. |
|
This method returns the value of the indexed coefficient. |
|
This method scales a point by a constant factor and returns a new point. |
|
This method returns the square of the length of a point. |
|
This method subtracts two points and returns their difference. |
|
This method returns a unit vector that points in the same direction as the point. |
|
The coordinates of the point |