In my Xna game, I am trying to have my playfield scale to the screen that it is running on. To do this, I use proportions to find the percent that the real window is scaled relative to my playfield. To do this, I divide the real width by the virtual width:
float _percent = _realViewport.Width / this._viewport.Width;
I always get 0, though, in the _percent variable. I set up a debug stop point at that line in my code, and analyzed the variables. this._viewport.Width equals 640, and _realViewport.Width equals 1280. So, using my calculator, 640 / 1280 SHOULD equal 0.5, but in my code I always get 0 out, instead of 0.5. Why is it doing this?