I've seen a few examples of code where they've added 0f to another float which I don't really understand.
The most recent example comes from a advance wars clone made in Monogame and C# if I recall correctly.
var hit = (int)(basedamage
* (Math.Ceiling((double)Life / 10f) / 10f)
* ((100f + 0f) / (100f + 0f)));
It seemed to me that it was pointless adding 0 to another number since well.. it's 0. But it's been clearly defined as a float so I assume there's a reason to that.
I asked a question on a game dev discord I was on and one of them told it that it was 'maybe to add precision' but he didn't seem so sure himself. I can't find any information on google (and to be truthful, I don't really know how to phrase what I'm trying to find out properly)
So, is it just to add more 'precision' to a float or is there another reason as to why some people do this?