BPoint: Style fixes for documentation.

This commit is contained in:
John Scipione
2014-05-20 15:47:25 -04:00
parent 18d4375e7c
commit e430d19ef6
+21 -21
View File
@@ -1,11 +1,12 @@
/* /*
* Copyright 2001-2007, Haiku, Inc. All Rights Reserved. * Copyright 2001-2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Frans van Nispen * Frans van Nispen
*/ */
#include <Point.h> #include <Point.h>
#include <stdio.h> #include <stdio.h>
@@ -18,10 +19,10 @@ const BPoint B_ORIGIN(0, 0);
void void
BPoint::ConstrainTo(BRect r) BPoint::ConstrainTo(BRect rect)
{ {
x = max_c(min_c(x, r.right), r.left); x = max_c(min_c(x, rect.right), rect.left);
y = max_c(min_c(y, r.bottom), r.top); y = max_c(min_c(y, rect.bottom), rect.top);
} }
@@ -40,49 +41,48 @@ BPoint::operator-() const
BPoint BPoint
BPoint::operator+(const BPoint& p) const BPoint::operator+(const BPoint& other) const
{ {
return BPoint(x + p.x, y + p.y); return BPoint(x + other.x, y + other.y);
} }
BPoint BPoint
BPoint::operator-(const BPoint& p) const BPoint::operator-(const BPoint& other) const
{ {
return BPoint(x - p.x, y - p.y); return BPoint(x - other.x, y - other.y);
} }
BPoint & BPoint&
BPoint::operator+=(const BPoint& p) BPoint::operator+=(const BPoint& other)
{ {
x += p.x; x += other.x;
y += p.y; y += other.y;
return *this; return *this;
} }
BPoint & BPoint&
BPoint::operator-=(const BPoint& p) BPoint::operator-=(const BPoint& other)
{ {
x -= p.x; x -= other.x;
y -= p.y; y -= other.y;
return *this; return *this;
} }
bool bool
BPoint::operator!=(const BPoint& p) const BPoint::operator!=(const BPoint& other) const
{ {
return x != p.x || y != p.y; return x != other.x || y != other.y;
} }
bool bool
BPoint::operator==(const BPoint& p) const BPoint::operator==(const BPoint& other) const
{ {
return x == p.x && y == p.y; return x == other.x && y == other.y;
} }