Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Converting Float in Int

This topic is 5521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Im going to asume your talking about C/C++ since i never heard of aux programming language

for C/C++ to convert a float to an int you use typcasting

if you dont know about typcasting chances are you dont know the c language(wich you should if your trying to do opengl)

im sure i could jsut tell you the answer but it jsut lead to more questions

the C language is easy to learn in a month or so
and learning more as you go

Share this post

Link to post
Share on other sites
if you have an int that wants a floats vaule (rouned down of course)

//declare and give value
int intvar = floatvar

typecasting would be tossing a (int) infront


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!