Added unary - operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21117 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,6 +29,7 @@ public:
|
|||||||
void ConstrainTo(BRect r);
|
void ConstrainTo(BRect r);
|
||||||
void PrintToStream() const;
|
void PrintToStream() const;
|
||||||
|
|
||||||
|
BPoint operator-() const;
|
||||||
BPoint operator+(const BPoint &p) const;
|
BPoint operator+(const BPoint &p) const;
|
||||||
BPoint operator-(const BPoint &p) const;
|
BPoint operator-(const BPoint &p) const;
|
||||||
BPoint& operator+=(const BPoint &p);
|
BPoint& operator+=(const BPoint &p);
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ BPoint::PrintToStream() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BPoint
|
||||||
|
BPoint::operator-() const
|
||||||
|
{
|
||||||
|
return BPoint(-x, -y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BPoint
|
BPoint
|
||||||
BPoint::operator+(const BPoint& p) const
|
BPoint::operator+(const BPoint& p) const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user