28 Sep
2013
28 Sep
'13
2:23 a.m.
Hail Devs,
In display/sodipodi-ctrl.cpp:133 has some interesting maths. It does int((float(value) - 1.0) / 2.0 + 0.5) ... which is a bit redundant. My tests in python show that this produces the same output as int(float(value) / 2.0)) for all ints and floats.
But this code has been there since MentalGuy committed rev 1. and It's passed through 2 developers since who thought it was sane. So I guess I need to make sure this isn't some C++ trick before I simplify it.
Best Regards, Martin Owens