#pragma once class _declspec(dllexport) Dbxy2 { public: Dbxy2(double _x, double _y) :x(_x), y(_y), w(0) {}; Dbxy2(double _x, double _y, double _w) :x(_x), y(_y), w(_w) {}; Dbxy2(const Dbxy2 &lhs) :x(lhs.x), y(lhs.y), w(0) {}; Dbxy2& operator=(const Dbxy2 &lhs) { x = lhs.x; y = lhs.y; w = lhs.w; return *this; } Dbxy2() { x = y = w = 0; }; /*bool Equal(Dbxy &pt) { if (IsDbEqual(x, pt.x) && IsDbEqual(y, pt.y)) return true; else return false; }*/ bool operator == (const Dbxy2 &rhs) const { if (rhs.x == this->x && rhs.y == this->y) { return true; } return false; } void operator+=(const Dbxy2 &rhs) { (*this).x += rhs.x; (*this).y += rhs.y; } void operator-=(const Dbxy2 &rhs) { (*this).x -= rhs.x; (*this).y -= rhs.y; } void Reversed(bool bRx = true, bool bRy = true) { if (bRx) (*this).x *= -1; if (bRy) (*this).y *= -1; } public: double x; double y; double w; };