How to calculate reverse scaling
Asked Answered
V

1

5

I'am scaling a stage for example the scale value is decreasing like:

1
0.9
0.8
0.7
0.6
0.5

I want to make an inversion of this values, to increase the scale of the objects in the stage like:

1
1.1
1.2
1.3
1.4
1.5

what is the best way to do this? or is there a formula calculation for this?

Virnelli answered 9/4, 2014 at 4:26 Comment(0)
W
9

Just divide 1 on the scale

If you had 10, scaled it by 0.8 and want it back:

size = 10 *0.8= 8

and back:

size = 8 *(1 / 0.8)= 10

Just remember to do it in reverse order if you scale multiple times as scale is accumulated (scale x newScale).

0.9
0.8
0.7
0.6
0.5

to get it back to start:

1/0.5
1/0.6
1/0.7
1/0.8
1/0.9

A small proof-of-concept.

Whereinto answered 9/4, 2014 at 4:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.