What's the Difference Between "5.0F" and "5. F" in C++?
I've Seen Both of Them Being Used, but I Never Realized the Difference Between Them. What's the Difference? 1 4 Answers None. 5. F Is Just a Shorter Form of...
I've seen both of them being used, but I never realized the difference between them. What's the difference ?
4 Answers
None. 5.f is just a shorter form of 5.0f (or 5.0000f, ...).
There isn't any. They are equivalent.
There are lots of other ways to express the same float literal in C++ (5.00f, 5e0f, 5.e+0f etc).
There is no difference 5.f=5.0f=5.00f=5.000f=5.0000f etc
They are prety much the same. It will just help you in code readability.