Chromium Code Reviews| Index: ui/gfx/vector2d_f.h |
| diff --git a/ui/gfx/vector2d_f.h b/ui/gfx/vector2d_f.h |
| index e78c68821b7f2f18d85decfccc30a7ba61a9bddd..ff1666f405440a1c927e0424be691ffef1185b92 100644 |
| --- a/ui/gfx/vector2d_f.h |
| +++ b/ui/gfx/vector2d_f.h |
| @@ -82,6 +82,16 @@ UI_EXPORT double CrossProduct(const Vector2dF& lhs, const Vector2dF& rhs); |
| // Return the dot product of two vectors. |
| UI_EXPORT double DotProduct(const Vector2dF& lhs, const Vector2dF& rhs); |
| +// Return a vector that is |v| scaled by the given scale factors along each |
| +// axis. |
| +UI_EXPORT Vector2dF ScaleVector2d( |
| + const Vector2dF& v, float x_scale, float y_scale); |
|
sky
2012/11/09 17:06:21
nit: when you wrap, wrap each param on its own lin
danakj
2012/11/09 18:21:47
Done.
|
| + |
| +// Return a vector that is |v| scaled by the given scale factor. |
| +inline Vector2dF ScaleVector2d(const Vector2dF& v, float scale) { |
| + return ScaleVector2d(v, scale, scale); |
| +} |
| + |
| } // namespace gfx |
| #endif // UI_GFX_VECTOR2D_F_H_ |