decompose pip_cmg
add serialization/pijsonserialization.h for JSON de/serialization add -J flag for pip_cmg to make JSON serialization methods not finished yet, but basically workable now
This commit is contained in:
@@ -127,7 +127,21 @@ public:
|
||||
//! \~russian
|
||||
//! Прибавить координаты второй точки и сохранить.
|
||||
//! \details Является копией метода \a translate().
|
||||
void operator+=(const PIPoint<Type> & p) { translate(p); }
|
||||
PIPoint<Type> & operator+=(const PIPoint<Type> & p) {
|
||||
translate(p);
|
||||
return *this;
|
||||
}
|
||||
|
||||
PIPoint<Type> & operator*=(Type v) {
|
||||
x *= v;
|
||||
y *= v;
|
||||
return *this;
|
||||
}
|
||||
PIPoint<Type> & operator/=(Type v) {
|
||||
x /= v;
|
||||
y /= v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! \~russian Сложить координаты двух точек.
|
||||
PIPoint<Type> operator+(const PIPoint<Type> & p) { return PIPoint<Type>(x + p.x, y + p.y); }
|
||||
@@ -144,6 +158,12 @@ public:
|
||||
//! \~russian Инвертировать координаты точки.
|
||||
PIPoint<Type> operator-() { return PIPoint<Type>(-x, -y); }
|
||||
|
||||
//! \~russian Умножить координаты точки.
|
||||
PIPoint<Type> operator*(Type v) { return PIPoint<Type>(x * v, y * v); }
|
||||
|
||||
//! \~russian Делить координаты точки.
|
||||
PIPoint<Type> operator/(Type v) { return PIPoint<Type>(x / v, y / v); }
|
||||
|
||||
//! \~russian Проверить равенство координат двух точек.
|
||||
bool operator==(const PIPoint<Type> & p) const { return (x == p.x && y == p.y); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user