[gameprogrammer] Re: floating-point-numbers

Christoph Harder wrote:
> Hello,
> 
> can anybody tell me why many OpenGL programmer user "1.0f" instead of
> just "1"?

The default way an integer like 1 is converted to an imprecise type is that it
is converted to a double, not a float.  To avoid implicit conversions to/from
double, they specify it at the outset as a float.
-- 
 Matthew Weigel
 hacker
 unique & idempot.ent

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: