Point.cpp
1 #include "Point.hpp" 2 3 Point::Point() : x(0), y(0) {} 4 5 Point::Point(const float x, const float y) : x(x), y(y) {} 6 7 Point::Point(const Point &other) : x(other.x), y(other.y) {} 8 9 Point &Point::operator=(const Point &other) { 10 if (this != &other) { 11 // Copy the values from the other Point object 12 const_cast<Fixed &>(x) = other.x; 13 const_cast<Fixed &>(y) = other.y; 14 } 15 return *this; 16 } 17 18 Point::~Point() {}