Quote:Original post by mbruenjes If you put a 'f' behind a floating point number, the compiler uses a float than cast it from double to float (I read that once somewhere). So float b = 0.0f should be a little faster than float b = 0.0 or float b = 0;
I seriously doubt any compilers worth using would do those conversions at run time. Speed is not an issue when dealing with literals.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by Glak "and am actually wondering if this is just for the sake of clarity?"
clarity is THE key to good programming.
Agreed. Always EXPLICITLY code what you mean. Don't let the compiler try to figure out what you meant. Besides, I hate sifting through other people's code when they shortcut it by leaving off the .0f's on all the floats. That's just pure laziness.