2D Point with integer coords
More...
#include <src/math/intpoint.h>
|
|
| IntPoint (int aX=0, int aY=0) |
|
bool | operator== (const IntPoint &p) const |
|
bool | operator!= (const IntPoint &p) const |
|
float | Length () const |
| void | LoadZero () |
| | Sets the zero point: (0,0).
|
| int * | Array () |
| | Returns the struct cast to int* array; use with care!
|
| const int * | Array () const |
| | Returns the struct cast to const int* array; use with care!
|
| IntPoint | operator- () const |
| | Returns the inverted point.
|
| const IntPoint & | operator+= (const IntPoint &right) |
| | Adds the given point.
|
| const IntPoint & | operator-= (const IntPoint &right) |
| | Subtracts the given point.
|
| const IntPoint & | operator*= (const float &right) |
| | Multiplies by given scalar.
|
| const IntPoint & | operator/= (const float &right) |
| | Divides by given scalar.
|
| std::string | ToString () const |
| | Returns a string "[x, y]".
|
|
| int | x |
| | X coord.
|
| int | y |
| | Y coord.
|
|
| const IntPoint | operator+ (const IntPoint &left, const IntPoint &right) |
| | Adds two points.
|
| const IntPoint | operator- (const IntPoint &left, const IntPoint &right) |
| | Subtracts two points.
|
| const IntPoint | operator* (const float &left, const IntPoint &right) |
| | Multiplies point by scalar.
|
| const IntPoint | operator* (const IntPoint &left, const int &right) |
| | Multiplies point by scalar.
|
| const IntPoint | operator/ (const IntPoint &left, const int &right) |
| | Divides point by scalar.
|
2D Point with integer coords
Analog of WinAPI's POINT struct.
◆ LoadZero()
| void Math::IntPoint::LoadZero |
( |
| ) |
|
|
inline |
Sets the zero point: (0,0).
◆ Array() [1/2]
| int * Math::IntPoint::Array |
( |
| ) |
|
|
inline |
Returns the struct cast to int* array; use with care!
◆ Array() [2/2]
| const int * Math::IntPoint::Array |
( |
| ) |
const |
|
inline |
Returns the struct cast to const int* array; use with care!
◆ operator-()
| IntPoint Math::IntPoint::operator- |
( |
| ) |
const |
|
inline |
Returns the inverted point.
◆ operator+=()
| const IntPoint & Math::IntPoint::operator+= |
( |
const IntPoint & | right | ) |
|
|
inline |
◆ operator-=()
| const IntPoint & Math::IntPoint::operator-= |
( |
const IntPoint & | right | ) |
|
|
inline |
Subtracts the given point.
◆ operator*=()
| const IntPoint & Math::IntPoint::operator*= |
( |
const float & | right | ) |
|
|
inline |
Multiplies by given scalar.
◆ operator/=()
| const IntPoint & Math::IntPoint::operator/= |
( |
const float & | right | ) |
|
|
inline |
◆ ToString()
| std::string Math::IntPoint::ToString |
( |
| ) |
const |
|
inline |
Returns a string "[x, y]".
◆ operator+
| const IntPoint operator+ |
( |
const IntPoint & | left, |
|
|
const IntPoint & | right ) |
|
friend |
◆ operator-
| const IntPoint operator- |
( |
const IntPoint & | left, |
|
|
const IntPoint & | right ) |
|
friend |
◆ operator* [1/2]
| const IntPoint operator* |
( |
const float & | left, |
|
|
const IntPoint & | right ) |
|
friend |
Multiplies point by scalar.
◆ operator* [2/2]
| const IntPoint operator* |
( |
const IntPoint & | left, |
|
|
const int & | right ) |
|
friend |
Multiplies point by scalar.
◆ operator/
| const IntPoint operator/ |
( |
const IntPoint & | left, |
|
|
const int & | right ) |
|
friend |
The documentation for this struct was generated from the following file: