This removes some lines of code and hopefully makes it a little more readable.
Also some compiler warnings, yielded by gcc version 4.1 (sparc32vm, 2006) , have been removed.
This were mostly warnings about missing implicit casts from float to integer.
Where possible I changed the order of the variables making the use of floats unneeded, i.e. first all integer multiplications and afterwards the divisions. This has the same precision as first casting all to float doing mult and div in random order and then casting back to int.
This pull request might need some close review.
This removes some lines of code and hopefully makes it a little more readable. Also some compiler warnings, yielded by gcc version 4.1 (sparc32vm, 2006) , have been removed. This were mostly warnings about missing implicit casts from float to integer.
Where possible I changed the order of the variables making the use of floats unneeded, i.e. first all integer multiplications and afterwards the divisions. This has the same precision as first casting all to float doing mult and div in random order and then casting back to int.