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.
|
|
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+=()
◆ operator-=()
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+
◆ operator-
◆ operator* [1/2]
Multiplies point by scalar.
◆ operator* [2/2]
Multiplies point by scalar.
◆ operator/
The documentation for this struct was generated from the following file: