scale method

void scale(
  1. double sx,
  2. double sy
)

Scales this rectangle by the given scale factors. The left and width values are scaled by {@code sx} and the top and height values are scaled by {@code opt_sy}. If {@code opt_sy} is not given, then all fields are scaled by {@code sx}. @param {number} sx The scale factor to use for the x dimension. @param {number=} opt_sy The scale factor to use for the y dimension. @return {!goog.math.Rect} This rectangle after scaling.

Implementation

void scale(double sx, double sy)
{
  left *= sx;
  width *= sx;
  top *= sy;
  height *= sy;
}