PDA

View Full Version : rounding GLfloat values??



piker
02-02-2002, 05:54 PM
I want to round a GLfloat value to a GLint value in my program. Any one know how? I dont want to use a ceiling or floor function but rather actually round. I am using Visual C++ if it makes a difference. Thanks.

Tron
02-02-2002, 11:04 PM
(int)(FloatNumber + 0.5f)