| Index: ui/gfx/vector2d_f.h
|
| diff --git a/ui/gfx/vector2d_f.h b/ui/gfx/vector2d_f.h
|
| index e78c68821b7f2f18d85decfccc30a7ba61a9bddd..6f5bb2294b37a85ce7343fbfd73980d590e0b3fe 100644
|
| --- a/ui/gfx/vector2d_f.h
|
| +++ b/ui/gfx/vector2d_f.h
|
| @@ -38,6 +38,16 @@ class UI_EXPORT Vector2dF {
|
| void operator+=(const Vector2dF& other) { Add(other); }
|
| void operator-=(const Vector2dF& other) { Subtract(other); }
|
|
|
| + void ClampFromAbove(const Vector2dF& other) {
|
| + x_ = x_ <= other.x_ ? x_ : other.x_;
|
| + y_ = y_ <= other.y_ ? y_ : other.y_;
|
| + }
|
| +
|
| + void ClampFromBelow(const Vector2dF& other) {
|
| + x_ = x_ >= other.x_ ? x_ : other.x_;
|
| + y_ = y_ >= other.y_ ? y_ : other.y_;
|
| + }
|
| +
|
| // Gives the square of the diagonal length of the vector.
|
| double LengthSquared() const;
|
| // Gives the diagonal length of the vector.
|
|
|