I am making a simple 2D game for Windows Phone 7 (Mango) using the XNA Framework.
I made the following comments:
float
SpriteBatch.Draw
Rectangle
int
Math
double
So my code is full of types with ints, floatand doubles. This is a hell of a lot of types.
Is there a way to get rid of them, or do I just not need to do this?
In addition, do these drives exist in the form of measurable performance losses?
, , -. float int , float double . , float int, . (, Convert.ToInt32). , . , :
Convert.ToInt32
float, double int multiplications == > ,4x 10x , , == > , .8 , ! == > , . 1/a,
, , . , , , , . AFAIK, Windows Phone doubles, Math, .
doubles
, , , XNA. , , , , , ( ).
Rectangle, , Vector2 float:
http://msdn.microsoft.com/en-us/library/ff433988.aspx
, () - , ( # static, , ).
static