   on the subject of floats
  Is there any reason why one should use 0.0f as opposed to 0.0 (like passing a floating point parameter to an OpenGL function)? Decimal numerical constants are automatically double, but they're floating point, and if so, then wouldn't simply passing the number as a decimal just be bad form and not really much more than a personal preference?[Edited by - Atash on December 13, 2005 8:06:13 PM]
  The "f" postfix is used to indicate that the value is actually a float constant, not a double with greater precision which is the default. Think of it as a short-hand for float(0).Calculations involving a double will be implicitly up-casted you risk, but it also affects functions with overloads for multiple floating-point types such as most of C++'s math library and template functions recieveing an implicit type. Thus you risk loosing performance or even generate incorrect code without it.It makes no technical difference when it's sent of directly to a function taking a float (as is the case with many OpenGL functions for instance) since the compiler will automatically cast it down for you. In which case it's mostly used for consistency or as a form of commenting. Beware that MSVC at least generates a warning when the result of such a conversion could be represented with greater accuracy as a double, which can be quite counter-intuitive considering that many decimal constants (such as 0.1) can't be represented accurately in floating point.You can also use 0.1L to indicate a long double, or apply U and/or L on integers for unsigned and long integers, respectively.   ;  Thanks!   