noob question PLZ HELP!

I have no experience with 3D code, so I’ve been looking at some basic tutorials, and have found something that noone seems to explain…

GL11.glRotatef(angle, 0, 0, 1.0f);

what does the “f” mean?

It means “float” as in the type. Its saying explcitly that the 1.0 on the end is a float and not a double.

Kev

And this is DEFINITELY in the wrong place.

JOGL or LWJGL topics (depending on which binding yo uare using) woudl have been closer.

Newless CLubies would probably have been dead on.

How is it in the wrong place? I’ve only seen stuff like 1.0f in 3D code, which is what this board is for, right?

Java 3D is a specific 3d API provided by Sun, thus this particular forum is for Java 3D specifics, not general 3D stuff with Java :slight_smile:

The f suffix syntax is common to most c-style languages, including Java. It is used to differentiate between a double and a float. The double is the default floating point primitive type in java, if you specify, say 0.0.