 # LayoutDemo Zooming Question

In the LayoutDemo the following code is used:

Dim newscale as single = CType(Math.Round(GoView1.DocScale * 0.9F * 100) / 100, Single)
This seems odd and when you zoom in/out really close or far it stops working. But I am unsure why the equation is set like this. Can you provide some details?
Once I get to a newscale value of .04, the zoom equation stops working. This is because at a newscale value of .04 the equation works out to the same value as it was originally do to the zoom equation.
Here's the math
(.04 *0.9 *100) = 3.6 rounds to 4
(4 /100) = .04 = rounds to .04
So effectively when you zoom out with a newscale value of .04, the zooming stops. Actually, any time you zoom out to .0X level, it will start working. I get this when you zoom in and out and at different levels. But it is more common when you have a VERY large graph. So I am trying to figure out how to adjust the equation to work correctly.
It also seems odd that you multiple by 100 then divide by 100. It would seem that the following equation would make more sense.
= CType(Math.Round(GoView1.DocScale * 0.9F) , Single)
I took out the rounding to get:
= CType(GoView1.DocScale * 0.9F , Single)
By removing the rounding it looks to fix the zoom getting stuck. But I am unsure exactly why the zoom equation was setup the way it was. It seems just a way to control the zooming effect to force zoom scale factors at .01 increments and when you are working at greater levels, it fails to work.
Do you have any versions of zooming that uses a better equation that will not get stuck? Do you see any problems with using the following?
Dim newscale as Single = CType(GoView1.DocScale * 0.9F , Single)
This removes the round and gives you more levels of zoom, but it also doesn't get stuck because the rounding is what is causing that.

No idea about the history of this, but it looks like you’ve got it figured out.

Thanks for letting me know.

It seems to be working fine with those changes. I am just concerned that since I have only been working on this since Monday, that I am missing something important here.
Best regards,