ezgl  1.0.1
An Easy Graphics & GUI Library
Public Member Functions | Public Attributes | Friends | List of all members
ezgl::point2d Class Reference

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.
 
point2doperator+= (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.
 
point2doperator-= (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.
 
point2doperator*= (point2d &lhs, point2d const &rhs)
 Multiply one point with another point.
 

Detailed Description

Represents a two-dimensional point.


The documentation for this class was generated from the following file: