|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a 2D point with integer coordinates. More...
#include <Point.hpp>
Public Member Functions | |
| constexpr | Point (int x=0, int y=0) |
| constexpr | Point (std::initializer_list< int > lst) |
| Point | operator+= (const Point &p) |
| Adds another point to this point in-place. | |
| Point | operator+ (const Point &p) const |
| Adds another point to this point and returns the result. | |
| Point | operator-= (const Point &p) |
| Subtracts another point from this point in-place. | |
| Point | operator- (const Point &p) const |
| Subtracts another point from this point and returns the result. | |
| Point | operator- () |
| Inverts the coordinates of this point and returns the result. | |
| Point | operator*= (float s) |
| Multiplies this point by a scalar in-place. | |
| Point | operator* (float s) const |
| Multiplies this point by a scalar and returns the result. | |
| Point | operator/= (float s) |
| Divides this point by a scalar in-place. | |
| Point | operator/ (float s) const |
| Divides this point by a scalar and returns the result. | |
| auto | operator<=> (const Point &) const noexcept=default |
| Compares this point with another point for equality. | |
| operator Engine3DRadSpace::Math::Vector2 () const | |
| Converts this point to a Vector2 representation. | |
Public Attributes | |
| int | X |
| X coordinate of the point. | |
| int | Y |
| Y coordinate of the point. | |
Represents a 2D point with integer coordinates.
|
inlineexplicitconstexpr |
| Engine3DRadSpace.Math::Point::operator Engine3DRadSpace::Math::Vector2 | ( | ) | const |
Converts this point to a Vector2 representation.
Multiplies this point by a scalar and returns the result.
| s | The scalar to multiply by. |
Multiplies this point by a scalar in-place.
| s | The scalar to multiply by. |
Adds another point to this point and returns the result.
| p | The point to add. |
Adds another point to this point in-place.
| p | The point to add. |
| Point Point::operator- | ( | ) |
Inverts the coordinates of this point and returns the result.
Subtracts another point from this point and returns the result.
| p | The point to subtract. |
Subtracts another point from this point in-place.
| p | The point to subtract. |
Divides this point by a scalar and returns the result.
| s | The scalar to divide by. |
Divides this point by a scalar in-place.
| s | The scalar to divide by. |
|
defaultnoexcept |
Compares this point with another point for equality.
| p | The point to compare with. |
| int Engine3DRadSpace.Math::Point::X |
X coordinate of the point.
| int Engine3DRadSpace.Math::Point::Y |
Y coordinate of the point.