|
|
| PointI (const PointI &that)=default |
| |
|
| PointI (int X_, int Y_) |
| |
|
template<typename XT , typename YT > |
| | PointI (XT X_, YT Y_, const typename std::enable_if< std::is_integral< XT >::value &&std::is_integral< YT >::value >::type *const dummy=nullptr) |
| |
|
| PointI (const PDPointI &that) |
| |
|
bool | Equals (const PointI &that) const |
| |
|
bool | operator== (const PointI &that) const |
| |
|
bool | operator!= (const PointI &that) const |
| |
|
PointI | operator- () const |
| |
|
void | Offset (int dx, int dy) |
| |
|
void | Mul (int num) |
| |
|
void | Div (int num) |
| |
|
PointI & | operator+= (const PointI &that) |
| |
|
PointI & | operator-= (const PointI &that) |
| |
|
PointI & | operator*= (int num) |
| |
|
PointI & | operator/= (int num) |
| |
|
PointI | operator+ (const PointI &that) |
| |
|
PointI | operator- (const PointI &that) |
| |
|
PointI | operator* (int num) const |
| |
|
PointI | operator/ (int num) const |
| |
◆ DistanceManhattan()
| static int PDF::PointI::DistanceManhattan |
( |
const PointI & | a, |
|
|
const PointI & | b ) |
|
inlinestatic |
Computes the Manhattan distance between two points.
The Manhattan distance is the sum of the absolute differences of the x and y coordinates. It is also known as L1 distance or taxicab geometry.
This metric is especially useful in grid-based systems where movement is restricted to horizontal and vertical directions only.
- Parameters
-
| a | The first point. |
| b | The second point. |
- Returns
- The Manhattan distance between point a and point b.
The documentation for this struct was generated from the following file: