> can't typecast the varibles in function ?
Well you can, but that isn't going to help since the final result is still an integer (centre.x is an int), so you'll automatically lose any precious fractions at that point.
> can't typecast the varibles in function ?
Well you can, but that isn't going to help since the final result is still an integer (centre.x is an int), so you'll automatically lose any precious fractions at that point.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.