Since when does 320.0 * 0.629 = 652!?

  • Thread starter Thread starter Robin Tucker
  • Start date Start date
R

Robin Tucker

RatioX is 2.018 (verified)
RatioY is 0.6291 (verified)

Therefore Ratio becomes 0.6291 (verified)

BUT! When I trace through the calc, BigPicture.Width becomes 625! Did I
make a huge mistake here? I can't see it



' Now find ratio of width and height to 320 x 240

Dim RatioX As Single = CType((sWidth / 320.0F), Single)
Dim RatioY As Single = CType((sHeight / 240.0F), Single)
Dim Ratio As Single = Math.Min(RatioX, RatioY)

' Set the width and height of the big picture

BigPicture.Width = CType((Ratio * 320.0F), Integer)
BigPicture.Height = CType((Ratio * 240.0F), Integer)
 
Oh hell, I got it. I'm dock.fill - which means when I set the property, it
automatically sets it back to the full width. Doh!
 
Back
Top