Chromium Code Reviews| Index: ui/gfx/point.h |
| diff --git a/ui/gfx/point.h b/ui/gfx/point.h |
| index 5f2a3d42287b8b1fd30fa7aa4f2f4fc7a0e5a564..fe39e3b4844c4146fb9d43a01db9ee679f9de7dc 100644 |
| --- a/ui/gfx/point.h |
| +++ b/ui/gfx/point.h |
| @@ -66,6 +66,10 @@ class UI_EXPORT Point { |
| return copy; |
| } |
| + Point Middle(const Point& other) const { |
| + return Point((x_ + other.x_) / 2, (y_ + other.y_) / 2); |
| + } |
| + |
| bool operator==(const Point& rhs) const { |
| return x_ == rhs.x_ && y_ == rhs.y_; |
| } |