ezgl
1.0.1
An Easy Graphics & GUI Library
|
Represents a two-dimensional point. More...
#include <point.hpp>
Public Member Functions | |
point2d () | |
Default constructor: Create a point at (0, 0). | |
point2d (double x_coord, double y_coord) | |
Create a point at the given x and y position. | |
Public Attributes | |
double | x = 0.0 |
Location of the x-coordinate. | |
double | y = 0.0 |
Location of the y-coordinate. | |
Friends | |
bool | operator== (point2d const &lhs, point2d const &rhs) |
Test for equality. | |
bool | operator!= (point2d const &lhs, point2d const &rhs) |
Test for inequality. | |
point2d | operator+ (point2d const &lhs, point2d const &rhs) |
Create a new point that is the sum of two points. | |
point2d & | operator+= (point2d &lhs, point2d const &rhs) |
Add one point to another point. | |
point2d | operator- (point2d const &lhs, point2d const &rhs) |
Create a new point that is the difference of two points. | |
point2d & | operator-= (point2d &lhs, point2d const &rhs) |
Subtract one point from another point. | |
point2d | operator* (point2d const &lhs, point2d const &rhs) |
Create a new point that is the product of two points. | |
point2d & | operator*= (point2d &lhs, point2d const &rhs) |
Multiply one point with another point. | |
Represents a two-dimensional point.