Varibles question(Floats)

Mar 27, 2012 at 7:26pm
ive been learning sfml lately and ive come across this line of code while learning:
1
2
3
4
const float Speed = 50.f;
float Left = 0.f;
float Top  = 0.f;

What does this mean? im confused on why they add ".f" after each number. Thanks for the help!
Mar 27, 2012 at 7:29pm
The ".f" means it's a float number (a Floating Point number).
If you don't include the f, it will be treated as a double number (a Double-Precision Floating Point number), but it will be converted back to float, and you will get a warning while compiling.
Mar 27, 2012 at 7:41pm
Thank you, the tutorial makes so much more sense now!
Last edited on Mar 27, 2012 at 7:41pm
Topic archived. No new replies allowed.