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