Why draw an operation on an android canvas using float instead of int for (x, y)? For example: http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float , float, float, android.graphics.Paint)
http://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float , float, float, float, android.graphics.Paint)
If I have many objects (say 200) for drawing in my application, and I have a class for each object, should I use 'int' or 'float' for the x, y attribute (the location of the object when drawn on the screen)? I think that "float" uses less memory than "int".
class MyObject { public int x; public int y; }
Thanks.
source share