Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently trying to transform a system by scaling it on x and y axis and have some uncertainty. I have the general concept that scaling works as such:

My original box has corners at (0, 0) and (3, 2) and I'm asked to scale the x axis by 3 and the y axis by -2.

Is this what the correct solution would look like (with corners at (0,2) and (6,-2))?

share|improve this question
up vote 2 down vote accepted

Given the points you have, no. The new rectangle will be defined by the points (0, 0) and (6, -4). The point on the origin will not scale to a new position where are the other point you have will. Scaling by -2 in the y will flip the rectangle so instead of having a point in the bottom left and top right it will now be in the top left and bottom right.

share|improve this answer
Got it. Is this what it would look like? – Kermit Mar 30 '13 at 18:06
Yes it is. Best is to remember that scaling will move things away (or if less than 0 then towards) the origin. Since a point is already at the origin it will stay there. – CodeNeko Mar 30 '13 at 18:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.