yunjianwu / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

change Renderer setPointSize(float size) to setPointSize(double size) #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just a suggestion for an improvement, as Java usually regards numbers as 
doubles instead of floats.
So right now I always have to write renderer.setPointSize((float)1.5) instead 
of just renderer.setPointSize(1.5) when I don't want to get any warnings

What is the expected output? What do you see instead?
Saves some time when coding as we can leave out the type cast. It's not really 
an error but the warning is still a bit annoying

Please provide a source code snippet that we can use to replicate the issue.
renderer.setPointSize((float)3.0);

would like:
renderer.setPointSize(3.0);

What version of the product binary library are you using?
achartegine-0.7.0

Please provide any additional information below.
thx, just a suggestion!

Original issue reported on code.google.com by guojy...@gmail.com on 13 Jan 2012 at 12:39

GoogleCodeExporter commented 9 years ago
That size value is used in calls like canvas.drawLine() and others which expect 
float values.
I don't think it is a good idea to pass a double and change it to a float.
Just do renderer.setPointSize(3); or renderer.setPointSize(3.5f);

Original comment by dandrome...@gmail.com on 20 Jan 2012 at 8:58